Array iteration issue
Posted
by
Tao
on Stack Overflow
See other posts from Stack Overflow
or by Tao
Published on 2012-09-29T09:36:52Z
Indexed on
2012/09/29
9:37 UTC
Read the original article
Hit count: 167
php
i have this array which i echo and get this results:
$hostess_ids[]=$row['hostess_id'];
$j=0;
foreach($hostess_ids as $hostess_selected){
$hostess_array= explode("-",$hostess_selected);
echo var_dump($hostess_array);
This is the output
array(1) { [0]=> string(2) "16" } array(1) { [0]=> string(2) "16" } array(1) { [0]=> string(0) "" } array(1) { [0]=> string(0) "" } array(2) { [0]=> string(2) "17" [1]=> string(1) "1" } array(1) { [0]=> string(0) "" } array(2) { [0]=> string(2) "17" [1]=> string(1) "1" } array(2) { [0]=> string(2) "17" [1]=> string(2) "16" }
How can i iterate in this array to get the first ceel values, then the second one, etc etc... Thanks..
© Stack Overflow or respective owner