Basic syntax of php
<?php
Code block;
?>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>第一个php程序</title> </head> <body> <?php echo "Hi 欢迎学习php"; ?> </body> </html>
Comments in php
// Single line comment
Multiple line comment
/*
php code
php code
phpcode
*/
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>第一个php程序</title> </head> <body> <?php /* 多行注释 echo "Hi 欢迎学习php"."<br>"; echo "Hi 欢迎学习php"."<br>"; echo "Hi 欢迎学习php"."<br>"; echo "Hi 欢迎学习php"."<br>"; echo "Hi 欢迎学习php"."<br>"; */ //echo 123; //单行注释 ?> </body> </html>