Home  >  Article  >  php教程  >  Php双引号和单引号的区别?

Php双引号和单引号的区别?

WBOY
WBOYOriginal
2016-06-21 08:56:581488browse

什么时候用单引号,什么时候用双引号呢?我看有时候又在混用,又时候又不行。

$a=1;
echo '$a';
echo "$a";
?>
单引号里的会原样输出,双引号里的如果含有变量,会输出变量的值



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