Hi, I have a system which I need to loop X number of times. It doesn't use a databae, it's just PHP code.
How can I loop it say 2 times?
Help much appreciated, Alex
Loop what 2 times?
I think most people use
for ($i = 0; $i < $x; $i++) { //something }
but there definitely is more than that, methinks.
u mean... FOR loop? DO WHILE?
for ($i=0;$i<2;$i++) { ...some code }
or
$i=0; while ($i<2) { $i++ ...some code }
do { ..... } while ()
more details: http://www.php.net/manual/en/control-structures.php