美文网首页
转义符,以及单双引号的使用

转义符,以及单双引号的使用

作者: 空_f554 | 来源:发表于2018-08-09 11:12 被阅读0次

    #单引号和双引号的区别

    常用转义符

    \\就是表示它本身。

    单引号只能解析\' 和\\两个转义符,而双引号能解析所有转义符。。

    单引号不会解析局部变量而

    双引号会

    $name = 'hello';

    echo "the $name";

    会输出 the hello

    而如果是单引号

    $name = 'hello';

    echo 'the $name';

    会输出 the $name

    相关文章

      网友评论

          本文标题:转义符,以及单双引号的使用

          本文链接:https://www.haomeiwen.com/subject/oelavftx.html