Home >php教程 >php手册 >PHP 双引号与单引号的区别

PHP 双引号与单引号的区别

WBOY
WBOYOriginal
2016-06-13 10:40:371009browse

单引号内部的变量不会执行,双引号会执行。


$name = hello;
echo "the $name";
会输出 the hello

而如果是单引号
$name = hello;
echo the $name;
会输出 the $name

主要区别就是这个。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn