while(){}
do{
}while();
for( 表達式1; 表達式2;表達式3 ){
語句或語句序列;
}
if(){}
if(){
}elseif{}
<?php
$i=0;
while(true)
{
if($i>=100)
break;
echo "@@@@@@@@@@@@.$i.<br>";
$i++;
?>
echo "<table border=1=800>";
echo "<caption><h1>學生成績表</h1></caption>";
$j=0;
while($i<1000){
if($i%10==0){
if($j++%2==0){
$bgc="#cccccc";
}else{
$bgc="#aaffaa";
}
echo "<tr bgcolor='".$bgc."'>";
echo"<td>".$i."</td>";
if(++$i%10==0)
echo"</tr>";
echo "</table>";
<script>
varyc=null
function show(obj)
{
yc=obj.style.backgroundColor;
obj.style.backgroundColor = "red";
}
function noshow(obj)
obj.style.backgroundColor=yc;
</script>
for($i=0;$i<100;$i++)
{
echo "@@@@@@@@@@@@@@@@@@@@@@".$i."<br>";
}
for($i=1; $i<=9; $i++)
for($j=1; $j<=$i; $j++)
{
echo$j."x".$i."=".$j*$i."&nbsp;&nbsp;&nbsp;";
}
echo "<br>";
?> //九九乘法表
while($i<100)
if($i==3)
continue;
echo "@@@@@@@@@@@@@@".$i."<br>";
$i++;
本文轉自 sswqzx 51CTO部落格,原文連結:http://blog.51cto.com/sswqzx/1963552