I want to implement the following logic in figdice:
<?phpfor($i=0;$i<count($arr1);$i++){for($j=0;$j<count($arr2);$j++){if($i==$j)//checking index of two array//do something;}}
I want to compare the key of the inner loop with the key of the outer loop. But when I used the function key() its only given the key of the inner array. I am unable to fetch the key of outer array.
Last edit: Gabriel Zerbib 2013-04-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to implement the following logic in figdice:
I want to compare the key of the inner loop with the key of the outer loop. But when I used the function key() its only given the key of the inner array. I am unable to fetch the key of outer array.
Last edit: Gabriel Zerbib 2013-04-10
SOLUTION:
We could capture the key() of the outer Walk, into a local variable.
Example:
Last edit: Gabriel Zerbib 2013-04-10