Please follow alone, I will explain a simple loop issue.
for($k=1;$k <10; $k++){
$test= $k;
echo $test; /// 123456789
}
echo $test; //// 9
as you can see, when I echo $test outside the loop, the results is 9. HOw can one echo $test outside the loop with all $k’s values..
example.
for($k=1;$k <10; $k++){
$test= $k;
}
echo $test; //// 123456789
Update like this
then use a foreach to retrieve the values.