After following, you can keep track of his dynamic information in a timely manner
Courses in the relevant section:PHP integer type is an integer
8进制和16进制的算法
2018-10-220个赞
Courses in the relevant section:PHP data type string
双引号是解析变量,单引号不解析变量
2018-10-220个赞
Courses in the relevant section:Nested if...else...elseif structure of PHP process control
<form action="run.php" method="post"> <input type="text" name="cj"> <input type="submit" value="查询"> </form> <?php $cj = $_POST['cj']; if(is_numeric($cj)){ if ($cj<60 && $cj>0) { echo "不及格"; }elseif ($cj<70 && $cj>=60) { echo "及格了,要努力"; }elseif ($cj<80 && $cj>=70) { echo "还不错"; }elseif ($cj<90 && $cj>=80) { echo "上清华有希望"; }elseif($cj<100 && $cj>=90){ echo "你这辈子没希望了"; }elseif($cj==100){ echo "更没希望了"; }elseif($cj>100){ echo "爱因斯坦转世啊,思密达!"; } }else{ echo "不是一个数值类型或者小于0 请输入正确的分数。"; } ?>
2018-10-230个赞
Courses in the relevant section:PHP flow control for loop control statement
<?php echo '<table border="1" width="200">'; for($i=0;$i<100;$i++){ if($i%10==0){ if($i%20==0){ echo '<tr>'; }else{ echo '<tr bgcolor="pink">'; } } echo '<td>'.$i.'</td>'; } if($i%10==0){ echo '</tr>'; } echo'</table>'; ?>
2018-10-230个赞