我在将PHP代码放在多行上时遇到了麻烦

时间:2013-03-16 21:55:33

标签: php html web formatting

<?php
$txt="Hello, my name is Max Koenig.";
$intro="I was Born and raised in Calgary, Alberta with my Mother, Father and Sister.";

echo $txt . " ". $intro;
echo strlen ("Hello, my name is Max Koenig.");



$t=date("H");

if ($t>"10")
    echo "Good Morning";

elseif ($t>"16")
    echo "Good afternoon";

elseif ($t>"19")
    echo "Goodnight"

?>

所有这一切都在跨越页面的一条线上,我不知道如何在不同的行上制作它们

1 个答案:

答案 0 :(得分:2)

请在每个PHP语句后使用HTML Break行标记。像

$txt="Hello, my name is Max Koenig. <br />"; $intro="I was Born and raised in Calgary, Alberta with my Mother, Father and Sister. <br />";