/* <head>Beta Code</head> <body> <?php echo “Hello, world!”; ?> </body> </html>
So, when the PHP engine first starts processing the page, it assumes it’s dealing with plain old HTML until told otherwise. By using the PHP delimiter, <!–?php, you’re telling the PHP engine to treat anything following the
echo (); print ();The two of them do the same job by printing the string between brackets, and you can return (True) value by print ()
// This is a comment # This is a comment /* This is a block comment */You can make your code more understandable!
$vAriAble $_variable $V4ri4ble $_214Possible forms of declaring variables
<?php $y=5; // global scope function majorTypes() { echo $y; // local scope } majorTypes(); function staticType() { static $x=0; // static scope echo $x; $x++; } staticType(); staticType(); staticType(); function parType($x) { echo $x; } parType(5); // parameter scope ?>Variables Scopes
You should know data-types before beginning in coding,,
$test_var; // Declares the $test_var variable without initializing it echo gettype( $test_var ) . “<br />”; // Displays “NULL” $test_var = 15; echo gettype( $test_var ) . “<br />”; // Displays “integer” $test_var = 8.23; echo gettype( $test_var ) . “<br />”; // Displays “double” $test_var = “Hello, world!”; echo gettype( $test_var ) . “<br />”; // Displays “string”gettype ($variable) >> function that can examine the variable and retrieve its type
TODO –> Google [is_DataTypes (VALUE) Func. && settype ($variable, "DataType") Fuc.]
HINT: Testing and Changing data_types of variables
See Ya reading the next post Tomorrow Brief <?php
$X = 76;
echo “Your progress today with this post is $X pages of the book;
// Read these posts with me DAILY and we will finish this book together
?>
Related articles
- Quick notes on PHP – What&Why (muhammedrefaai.wordpress.com)















Pingback: Quick notes on PHP – barely detailed | Muhammed Refaai
Pingback: Quick notes on PHP – Making A Decision | Muhammed Refaai