PHP的单引号和双引号

单引号内部的变量不会执行,双引号会执行。
1 <?php
2 $name = 'hello php';
3 echo "<h1>$name</h1>";
4 echo '<h1>$name</h1>';
5 ?>

效果以下:php

相关文章
相关标签/搜索