PHP Tutorial - For Loop
Digg! This Page
Introduction
This tutorial will allow you to make a really easy number selecting dropdown menu, using PHPs for() loop.Step 1
Start by just making the basic HTML code for a dropdown menu, which is the SELECT HTML tag.Step 2
Now we have the beginnings of the dropdown selection, we need to add the PHP for() loop in it. We need to now tell the PHP to continue to, lets say 35, so to do this we add the for() loop.If you are currently lost then I will explain each bit to you individually. The for() loop holds 3 properties, where $i=1 is, tells the loop to start from the value of 1. The <=35 bit tells it how much to go upto, then the $i++ tells the loop to count UP to that amount.



