PHP Update : August 23,2012
PHP My case was in Foxserv Server Suit 1. [FoxServ3.1Beta1.exe] 2. Change [foxserv] in httpd.conf to [easyserv] 3. Press Go for PHP and Apache Root in C:\FoxServ\www 5. Question How do you write 1 – 5 in separate lines? Remark One to five in x.php On webserver that support PHP Language
This source code in x.php was not the answer
<? echo " "; ?>
ok <? echo " "; ?>
ok
ok
no <? echo "1"; echo "2"; echo "3"; echo '4'; echo '5'; ?>
ok <? echo "1 "; echo "2 "; echo "3 "; echo '4 '; echo '5 '; ?>
no <? echo "1\n"; echo "2\n"; echo "3\n"; echo '4\n'; echo '5\n'; ?>
ok <? echo " 1\n 2\n 3\n 4\n 5\n "; ?>
ok <? echo "1\n2\n3\n4\n5\n"; ?>
ok "; ?>
no.. It was not error and warning If you do not declare <? echo $i++." "; ?>
ok <? for($i=1;$i<=5;$i++) echo "$i\n"; ?>
ok <? for($i=1;$i "; ?>
ok <? for($i=1;$i "; ?>
no <? for($i=1;$i<5;$i++) { echo "$i "; } ?>
ok "; ?>
ok
ok
ok
ok <? for ($i=49;$i<54;$i++) echo chr($i).chr(10); ?>
ok <? $s ="12345"; for($i=0;$i "; ?>
ok <? foreach (range(1,5) as $x) { echo "$x "; } ?>
ok <? $a = array(1,2,3,4,5); foreach ($a as $x) { echo "$x "; } ?>
no <? $i = 0; while ($i <= 5) { echo $i; echo " "; $i = $i + 1; } ?>
ok <? $i = 1; while ($i "; ?>
ok <? $i = 1; while ($i <= 5) { echo $i++." "; } ?>
ok "; ?>
no <? while (true) { if ($i >= 5) break; else print $i++. " "; } ?>
no <? $s = "1,2,3,4,5"; $a = explode( ',', $s); $i=1; do { echo $a[$i++]." "; } while ($i < 5); ?>
no <? do { echo $i++." "; } while ($i < 5); ?>
ok <? do { echo $i++." "; if($i > 5) break; } while (true); ?>