I have an array, which is consist of many arrays. So i want to execute foreach loop on it. I want to generate options from it.
Array
Array
(
[0] => Array
(
[user_id] => 201
[first_name] => ayaz
)
[1] => Array
(
[user_id] => 212
[first_name] => khalique
)
)
I have tried
<?php foreach($UserDataEmail as $user){
foreach($user as $val){?>
<option value="<?=$val['user_id']?>" ><?=$val['first_name']?></option>
<?php }
}// end foreach ?>
But it does not work, can any one guide me where i'm wrong. Thanks