'<h1 id="mainhead">total cost</h1><p>the total cost of purchasing '.$_post['quantity'].'widget(s) ' ==========================================是把 '<h1 id="mainhead">total cost</h1><p>the total cost of purchasing ' $_post['quantity'] ,'widget(s) ' 这三个字符串连接起来
你要好好看看PHP的基础知识,在PHP里,‘’和“”的意思不同的,单引号是表示字符了,而双引号是函数,当然函数可以不用引号的,所以在这个句子中:<h1 id="mainhead">total cost</h1><p>the total cost of purchasing 这 串为字符,一定 要用单引号或双引号引起来。.是连结符。中间写上函数,然后又是字符
==========================================是把
'<h1 id="mainhead">total cost</h1><p>the total cost of purchasing '
$_post['quantity']
,'widget(s) '
这三个字符串连接起来
你要好好看看PHP的基础知识,在PHP里,‘’和“”的意思不同的,单引号是表示字符了,而双引号是函数,当然函数可以不用引号的,所以在这个句子中:<h1 id="mainhead">total cost</h1><p>the total cost of purchasing 这 串为字符,一定 要用单引号或双引号引起来。.是连结符。中间写上函数,然后又是字符