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