0.05b PHP Functions

by

in

Useful functions built into PHP

You can display the entries in an array with the following code:

1 foreach ($myarray as $name) echo “$name.<br>”;
// foreach is a useful tool for dealing with arrays
// echo is probably the most used built in function in PHP

Click here for more information.

2 if ($condition) then $x=3; // this is the standard if statement

Click here for more information.

3 $var=$condition ? true : false; // this is a short-hand if-then-else construct.

Click here for more information.


Comments

Leave a Reply