Chapter 3 Introduction to PHP. By default, PHP documents end with the extension . php files ending with . htm or .html to also get parsed by the PHP processor
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
$oxo = array(array('x', '', 'o'),
array('o', 'o', 'x'),
array('x', 'o', '' ));
Operators are the mathematical, string, comparison, and logical commands such as plus, minus, times, and divide. PHP looks a lot like plain arithmetic; for instance, the following statement outputs 8:
echo 6 + 2;Operators
The syntax to assign a value to a variable is always variable = value. Or, to reassign the value to another variable, it is other variable = variable.
echo "You have " . $msgs . " messages.";Variable Assignment
Variables do not have to be declared before they are used, and that PHP always converts variables to the type required by their context when they are accessed.Variable Typing
Constants are similar to variables, holding information to be accessed later, except that they are what they sound like—constantConstants
echo cannot be used as part of a more complex expression, whereas print can
$b ? print "TRUE" : print "FALSE";