PHP – Setting Variables Eli the Computer Guy PHP Programming (NEW) Variables in PHP can be set without needing to be declared. <?php $string = “Hello World”; $int = 1; $float = 2.2; print “<h1>String</h1>”; print $string; print “<h1>Int</h1>”; print $int; print “<h1>Float</h1>”; print $float; ?> PHPVariables
PHP Programming (NEW) PHP – Access Array Values – Foreach() Eli the Computer Guy PHP Programming (NEW) The foreach() function allows you to loop though an array to process the values as variables.
*NEW PHP – Turn Strings into Arrays with explode() Eli the Computer Guy *NEW, PHP Programming (NEW) The explode() function allows you to turn a String into an Array based on a separator you define. explode() https://www.php.net/manual/en/function.explode.php https://www.w3schools.com/php/func_string_explode.asp explode.php
Be the first to comment