PHP Markup in PHP
<?php
?>
The output statement in PHP is the Echo
<? PHP Echo "<p>php OUTPUT Statement! </p> ";? >
Here, we do not use PHP to achieve pure HTML does not implement the function
The main reason to use the server-side scripting language is to be able to provide dynamic content to site users, which is a very important application, because the user needs or changes over time to enable users to constantly access the site
PHP can easily implement this function, the following is a time real output
Note: The PHP statement ends with a semicolon (;).
<! DOCTYPE html>PHP // This is a single-line comment # This is also a single-line comment /* This is a multiline comment block that spans multiple lines of */?></body>
Note://This is a single-line comment
#这也是单行注释
/* Multiline Comment
*/
Add Dynamic Content
<? PHP Echo ' <p>order processed at '; Echo Date (H:i,js,f,Y); Echo ' </p> ';? >
The above code can also be used with the operator (.). Write it in one line of code. Take a look below
<? PHP Echo ' <p>order processed at '. Date (' H:i,js F Y '). ' </p> ';? >
In the above code, we use the built-in date () function of PHP to tell the customer the date and time the order was processed, and when the script is run, it displays a different time and date.
PHP embeds PHP in HTML