Variables are the main way to store information in a PHP program.Īll variables in PHP start with a leading dollar sign like $variable_name. $NAME and $NaMe are both treated as different variables: " In the example below, only the first statement is valid and will display the value of the $name variable. However, all variable names are case sensitive. In the example below, all three echo statements are valid: " ĮcHo "Enjoy all of the ad-free articles" The output of that would be: Developer NewsĪll keywords, classes, and functions are NOT case sensitive. Here's a simple script that uses the built-in echo function to output the text "The Best PHP Examples" to the page: Also, PHP statements end with a semicolon ( ). PHP scripts can be placed anywhere in a document, and always start with.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |