Cheap Web Hosting Provider-PHP tutorial part 2

 




 

 

 
Internet we hosting provider
best of the month
Hosting Review


iPowerWeb - $7.95/mo

Lunarpages - $7.95/mo
Jumpline - $9.95/mo
ApolloHosting - $13.96/mo
HostRocket - $11.95/mo
Globat - $7.50/mo
WebsiteSource - $ 13.96/mo


PHP Tutorial


Featured website
Lunar Page

  500MB storage and 20GB transfer for $7.95 a month!

FREE Setup Fee!
500 Megs Storage!
20 Gigs Transfer!
Unlimited Email account!
FTP access!
$7.95 Per Month!
30 day Guarantee!



 

Fast Orange 125 x125 

3.1 The WHILE Loop

The WHILE loop is one of the most useful commands in PHP. It is also quite easy to set up and use. A WHILE loop will execute a piece of code until a certain condition is met

Example :

$i = 5;
$x = 0;
while ($x < $i) {
echo "Looping.....";
++$x;
}

The first two lines are just initializing the variables, variable $i inidicate the number of times you want to repeat the code. The $x variable is the one which will count the number of times the code has been executed. After these is the WHILE line. This tells the computer to repeat the code while $x is less than $i (or to repeat it until $x is equal to $i). This is followed by the code to be executed which is enclosed in { }.

3.2 Arrays

Arrays are common to many programing languages. They are special variables which can hold more than one value, each stored in its own numbered 'space' in the array.

Setting Up An Array

$names[0] = 'Peter';
$names[1] = 'Paul';
$names[2] = 'Mary';
$names[3] = 'Issac';
$names[4] = 'David';

Reading From An Array

Reading from an array is just the same as putting information in. All you have to do is to refer to the array and the number of the piece of data in the array. So if I wanted to print out the third name I could use the code:

echo "The third name is $names[2]";

Which would output:

The third name is Mary


Locating An PHP Web Hosting Provider:

iPowerWeb.com is one of the best choice for PHP web hosting. It has all of the basic components needed for operating most websites. And they did it at $7.95 per month.

 

 


cheap-web-hosting-providers.com
-find your hosting here
For your internet web hosting, web hosting provider, cheap website hosting, low cost web hosting guide, web hosting services, website hosting, PHP, JSP, ASP, cheap hosting, low cost website hosting and much more.