变量和文本PHP之间的差距


Gaps between variable and text PHP

结果是:

价格为5850.00欧元我需要这个价格为5850.00欧元

<?
$quantity = 25;
$price = 195;
$tax = .20;
$quite = $quantity * $price;
$quite = $quite + ($quite * $tax);
$quite = number_format($quite, 2);
echo 'price is' , $quite , 'Euros';

?>

感谢

尝试:

echo 'price is ' , $quite , ' Euros';

甚至:

echo "price is $quite Euros";

有关后一种语法的详细信息,请参阅PHP手册中关于字符串的"变量解析"部分。

(Ps。这不应该是$quote而不是$quite吗?)

尝试:

echo 'price is ' , $quite , ' Euros';