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

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -