Friday, August 28, 2015

converting for loop to while loop

/*
 *converting for loop to while loop
 * */
for($i = 0; $i < 5; $i++){
   echo $i;
}

$i = 0;
while($i < 5){
   echo $i;
   $i++;
}

No comments:

Post a Comment

css snippet for blogger code highlighting

code, .code {     display: block;     background: beige;     padding: 10px;     margin: 8px 15px; }