Hi everybody,
I have the following php loop that takes an array that contains a set of arrays, then I convert each array to a list to manipulate more accurately the elements.
while ($i<sizeof($my_array)){
while(list($key,$val) = each($my_array[$i])){
$j = $i+1;
if ($key == "fruit"){
$val = "ananas".$j;
echo $val;
}
}
$i++;
}
But, when I print the "search" array (print_r($my_array)), the values don't change. How can you explain thaht? Is there a solution to modify the "$val" without changing the loop structure and logic?
Thank you,
Regards.