- Forums
- PHP
- Learn PHP Tutorial How To Use For Loops Code Samples Guide Steps Teach
This Page Contains information about Learn PHP Tutorial How To Use For Loops Code Samples Guide Steps Teach By wallpaperama in category PHP with 0 Replies. [1010], Last Updated: Sat May 18, 2024 
 
 wallpaperama
 Tue Mar 06, 2007 
 0 Comments
 634 Visits
Today i will teach you how you can use a typical 
for loop.
all you need is webhosting with php. if you don't have one yet, visit www.webune.com and sign up for php hosting.
if you are using windows, you can use notepad to create php scripts
so open your notepad and copy and paste the code to see how this example (sample) script works
CODE:
<?php
   for($counter =1; $counter <= 10; $counter++)
   {
      print("counter is $counter<br>\n");
   }
?>
Output:
CODE:
counter is 1
counter is 2
counter is 3
counter is 4
counter is 5
counter is 6
counter is 7
counter is 8
counter is 9
counter is 10