Heya guys.
I have the code
So basically, the variables inside the array are passed on from the URL, and they can be anything from 0 to 999 etc, though they most likely won't be higher than 10.
So, the problem:
I'm trying to get the loop to echo the code using the value given from the variable as the limiter. Using one variable from the array once..
First using the value from $s0, then from $s1 etc - u get my drift.
The issue is that this ends in an infinite loop.
I've tried foreach also, but no success in obtaining the goal i described here.
Thanks for answers
I have the code
Code:
$arr = array($s0, $s1, $s2, $s3, $s4, $s5, $s6, $s7, $s8, $s9);
for ($title=0; $title<=$arr; $title++) { echo "
<tr>
<td> » Sub-section "; echo $subs; echo "."; echo $title; echo ": <textarea class='boe_soi_edit2' cols='38' name='title"; echo $subs; echo "sub"; echo $title; echo "' style='font-size:10pt;float:right;font-weight:normal;'></textarea></td>
</tr>"; }
So, the problem:
I'm trying to get the loop to echo the code using the value given from the variable as the limiter. Using one variable from the array once..
First using the value from $s0, then from $s1 etc - u get my drift.
The issue is that this ends in an infinite loop.
I've tried foreach also, but no success in obtaining the goal i described here.
Thanks for answers
Comment