如果把字符串常量和变量一起输出的话,必须使用双引号,双引号能识别字符串中的变量。
而单引号会把它包含的内容当成一个整体的字符串常量输出。
$name = 'wangyuchun';
$car = array('Volvo', 'Ford', 'BMW');
echo 'my name is $name</br>';
echo "my car is $car[0]</br>";
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!