I have multidimensional array with user values I am using for loop to echo those values but I am getting error undefined offset ,here is my code I am not able to understand how to echo those values.
$user_list=array(); //values stored from table in multidimensional array
echo '<pre>';print_r($user_list);
Array
(
[0] => Array
(
[id] => 1
[name] => abc
[email] => [email protected]
)
[1] => Array
(
[id] => 2
[name] => xyz
[email] => [email protected]
)
[2] => Array
(
[id] => 3
[name] => mym
[email] => [email protected]
)
)
<?php
for($row = 0; $row <count($user_list) ; $row++){
echo $row."<br>";
for ($col = 0; $col < count($user_list[$row]); $col++) {
echo $user_list[$row][$col];
}
}
?>