Why can't I fill this php array in while loop? -
i'm trying add values array in while loop in php, however, can't seem so. values added array if test strings, using variables doesn't work. variables ($array[$j][0]) can echoed not added added array.
while($j>0){ $added=array(); $added[]=$array[$j][0]; } print_r($added);
each time $added array getting reset(empty) in while loop. use below code
$added=array(); while($j>0){ $added[]=$array[$j][0]; } print_r($added);
Comments
Post a Comment