PHP – Code Reuse – include Eli the Computer Guy PHP Programming (NEW) Using includes you can reuse the same code in multiple scripts. //include.php <?php $time = time(); include 'included.php'; print $message; print "</br>"; print $time; ?> //included.php <?php $message = "HELLO WORLD FROM AN INCLUDE"; ?> PHP
*NEW PHP – Test Variable Against an Array with in_array() Eli the Computer Guy *NEW, PHP Programming (NEW) The in_array() function allows you to check if a value is stored with an Array. This can be used for things such as creating an array of which states a company ships products to. in_array() […]
PHP Programming (NEW) PHP – elseif Statements Eli the Computer Guy PHP Programming (NEW) elseif statements allow you to check to see if any of a number of conditions are true before failing out to the else in an if statement.
PHP Programming (NEW) PHP – Do While Loops Eli the Computer Guy PHP Programming (NEW) Do While Loops perform one iteration before a condition is tested.
Be the first to comment