Categories: Blog

0.05b PHP Functions

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.

Editor

Share
Published by
Editor

Recent Posts

0.06a History of MariaDB

Origins 2008 – The Fork Begins MySQL AB had been acquired by Sun Microsystems in…

3 days ago

0.05a PHP Variables

Variables are essential to writing code in PHP. Variables always start with the dollar sign…

4 days ago

1.03 Set up WampServer

WampServer, a Windows web development environment. This only runs on Windows computers but it is…

4 days ago

1.02 Set up XAMPP

XAMPP a local environment for web development. Setting up XAMPP (which stands for X (Cross-Platform),…

4 days ago

1.01 Starting out in PHP

This will get you started writing in PHP. Just go to w3schools.com and click on…

4 days ago

0.06 The History of MySQL

MySQL was created in 1994 by Swedish developers David Axmark and Allan Larsson, along with…

5 days ago