PHP is a network programming language that is also a scripting language.
1.hello World
<?php
echo "Hello World";
?>
2. Code style, Javascrip style
<?php
Source Code Section
?>
3. Data type
The dollar sign $ is the identifier of the variable, regardless of the declaration or invocation of the variable, with $.
PHP Data types are Boolean, String, Integer, floating-point
String, in PHP, there are three ways to define strings, single quotes, double quotes, and <<<, and the first two are more commonly used
The difference is that (1) double quotes are replaced with actual values, while single quotes are output as normal strings. (2) Another difference is that for escape characters, single quotes are used as long as single quotes are escaped, while double quotation marks are used for the use of one of the other characters, which are displayed by an escape character.
Getting Started with PHP 1