PHP Function Function syntax function function_name() { php code; } Function example <html> <body> <?php function Test() { echo "I like PHP functions!"; } Test(); ?> </body> </html> Result I like PHP functions! Function with parameters <html> <body> <?php function pFunction($p_name,...
PHP Arrays An array in PHP is a type that associates values to keys. This type can be an array, list, hash table, dictionary, collection, stack, queue. Simple array example <html> <body> <?php $courses = array("PHP", "MySQL"); echo "I learn "...
PHP While While syntax while (expression is true) { execute statement } While example <html> <body> <?php $x = 1; while ($x <= 3) { echo "<br />"; echo "x = ", $x++; } ?> </body> </html> Result x = 1...