How to skip iterations in a for loop in PHP?

xtoph3r

New Member
I have a list of options (booked seats) from which I want to exclude certain values (e.g., 3, 4, 8 and 19). The code I have for constructing the list is:\[code\]<?phpfor ($i=1; $i<=27; $i++) { echo "<option value=http://stackoverflow.com/questions/3597461/$i>$i</option>"; }?>\[/code\]How do I exclude 3, 4, 8 and 19 from the list?
 
Back
Top