I have an array in PHP 3 that I build like this;
$var_list[$i] -- first level
$var_list[$var_list[$i] ][$j] --2nd level
$var_list[$var_list[$var_list[$i] ][$j]][$k] --3rd level
I use loops as follows..
for ($i=0; $i < count1; $i++ ) {
$var_list[$i] = $theval;
for ($j=0; $j < count1; $j++ ) {
$var_list[$var_list[$i] ][$j]=$anyval;
for ($k=0; $k < count1; $k++ ) {
$var_list[$var_list[$var_list[$i] ][$j]][$k]=$someval;
}
}
}
The problem is the $k value in the inner loop always appears to be "0" so I never get a past the 0 row of the 3rd level & my values over-write each other..
Any ideas??