Jump to content

"Very Simple" For function to count to 10


johnsmith153

Recommended Posts

SOMEONE SHOW ME THE SAME WITH DO WHILE LOOP PLEASE ....

 

<?php 

//foreach method

foreach(range(1, 10) as $redarrow){ echo $redarrow; } 


echo"<br><br>";

//for loop.
for($i=1; $i<11; $i++){echo $i;}


echo"<br><br>";


$x=1;
while($x<11)
{echo $x; $x++;}

echo"<br><br>";

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.