echo语句
echo语句是PHP输出语句,可以把字符串输出(字符串用双引号扩起来)。
如下代码
<?php echo "Hello World!"; ?>
注意echo关键字和字符串之间至少要有一个空格。下面的写法是不正确的:
<?php echo"Hello World!"; ?>
实例:
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Echo语句</title></head><body><p> <?php echo "Welcome to imooc!"; ?></p></body></html>