0
<?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"

?>

所有这些都在跨越页面的一行上,我不知道如何将它们放在单独的行上

4

1 回答 1

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 />";
于 2013-03-16T21:58:26.050 回答