Languages :: PHP :: PHP: TWO INNER "FOR I" CENTENCES ***URGENT*** |
|||
| By: excii |
Date: 22/06/2003 00:00:00 |
Points: 50 | Status: Answered Quality : Excellent |
|
Hi! I am thinking why this is not possible or I just can't get it work: for ($i=0;$i<count($variable1);$i++) { echo $variable1[$i]; for ($i=0;$i<count($variable2);$i++) { echo $variable2[$i]; } } Get the idea of that? Good :) I need to do that... or something like that... Regards, excii |
|||
| By: VGR | Date: 23/06/2003 05:02:00 | Type : Answer |
|
| why do you want to do this ? It's strictly forbidden by "good practices" and sometimes by compilers (modifying the loop variable inside the loop itself) Perhaps this what you wanted ? for ($i=0;$i<count($variable1);$i++) { // what is the link between $var2 and $var1 !!!?!! //debug echo $variable1[$i]; // for ($j=$i;$j<count($variable2);$j++) { echo $variable2[$j]; } // for $var2 } // for $var1 |
|||
| By: excii | Date: 23/06/2003 05:21:00 | Type : Comment |
|
| yeah... there is a link... database link... that was just a simple sample :D And I solved that myself, I mean that $j thing... you get points anyway :) |
|||
|
Do register to be able to answer |
|||
| Add This Article To: | |||
| |
|
|
|
| |
|
|
|








