Home > Backend Development > PHP Tutorial > Advanced usage of while(){}_PHP tutorial

Advanced usage of while(){}_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:37:48
Original
1045 people have browsed it

/*$ip="127.0.0.1";
if($_SERVER["REMOTE_ADDR"]==$ip){
   header("location:xxx.php");
}else{

      header("location:yyy.php");
}


function limitIp($ip){
if($_SERVER[REMOTE_ADDR]==$ip){
   header("location:XXx.php");
}else{
   header("location:YYY.php");
}
}*/

/*
echo "

";
echo "";
$i=0;
$j=0;
while($i<1000){
if($i%10==0){
   if($j++%2==0){
    $bgc="#cccccc";
   }else{
      $bgc="aaffaa";
   }
   //echo "";
   echo "";
}
echo "";
if(++$i%10==0){
   echo "";
}

}
echo "

学生成绩

$i
";
*/
echo "
";
echo "";
$i=0;
$k=0;
while($i<100){
    if($i%2==0){
    $bgc="#cccccc";
}else{
     $bgc="#aaffaa";
}
echo "";

$j=0;
while($j<10){
  
   echo "";
   $j++;
   $k++;
}
echo "";
$i++;

}
echo "

学生成绩

$k
";
?>
<script><br> var yuancolor=null;<br> function show(obj){<br> yuancolor=obj.style.backgroundColor;<br> obj.style.backgroundColor="red";<br> }<br> function noshow(obj){<br> <br> obj.style.backgroundColor=yuancolor;<br> }<br> <br> </script>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/486549.htmlTechArticle?php /*$ip=127.0.0.1; if($_SERVER[REMOTE_ADDR]==$ip){ header(location:xxx.php); }else{ header(location:yyy.php); } function limitIp($ip){ if($_SERVER[REMOTE_ADDR]==$ip){ header(loc...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
while loop
From 1970-01-01 08:00:00
0
0
0
An error occurred while accessing the login page
From 1970-01-01 08:00:00
0
0
0
java - Questions about While,break
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template