課程
/后端開發
/PHP
/PHP入門篇
我發現一個問題,教的時候中間連接的符號可以為單引號,但是輸出結果有符號,用雙引號輸出正常,,,你們是嗎,我才開始學
2017-02-26
源自:PHP入門篇 1-5
正在回答
對的
單引號內部的變量不會執行雙引號會執行如$name = 'hello';echo "the $name";會輸出 the hello而如果是單引號$name = 'hello';echo 'the $name';會輸出 the $name
慕粉4204847
qq_F_154 提問者
收藏一下
舉報
PHP入門教程輕松學習,行業大牛幫您快速掌握PHP編程基礎知識。
2 回答php字符串
1 回答PHP字串符
2 回答php 字符串和字符
3 回答php 比較字符串 是采用什么?
1 回答Php-字符串為什么顯示錯誤
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2017-02-26
對的
單引號內部的變量不會執行
雙引號會執行
如
$name = 'hello';
echo "the $name";
會輸出 the hello
而如果是單引號
$name = 'hello';
echo 'the $name';
會輸出 the $name
2017-02-27