如何在php中为执行计算的行进行换行?例如,如何在以下代码中添加换行符? br似乎不起作用......
echo 10+20; //now I want a new line after this calculation
答案 0 :(得分:1)
尝试其中任何一个:
echo (10+20) . PHP_EOL; // This is if your headers are set as plain text.
echo (10 + 20). '<br/>'; // if html headers
答案 1 :(得分:0)
您可以添加新的echo "<br>"
:
echo 10+20; //now I want a new line after this calculation
echo "<br>";
echo 23+22;