Basic PHP syntax taobeibei. iteye. comblog614800PHP script block with & lt ;? Php starts? & Gt; end. You can place PHP script blocks anywhere in the document. Of course, you can use & lt ;? And? & Gt; to start and end the script block. However, to achieve the best compatibility, we recommend that you use the standard-form basic PHP syntax.
Http://taobeibei.iteye.com/blog/614800
PHP script block Start?>End. You can place PHP script blocks anywhere in the document.
Of course, you can use To start and end the script block.
However, we recommend that you use the standard format (
PHP files usually contain HTML tags, like an HTML file and some PHP script code.
Below, we provide a simple PHP script, which can output the text "Hello World" to the browser ":
Each line of code in PHP must end with a semicolon. A semicolon is a separator used to differentiate the instruction set.
There are two basic commands for outputting text through PHP:EchoAndPrint. In the preceding example, the echo statement is used to output the text "Hello World ".
Comments in PHP
In PHP, we use // to write single-line comments, or use/* and */to write large comments.