Array iteration issue and save it to two dimensional array
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/12651608/array-iteration-issue">Array iteration issue</a>  </p>
</blockquote>



<p>i have this array which i echo and get this results:</p>

<pre><code>$hostess_ids=array();
while($row=mysql_fetch_array($resulthst,MYSQL_ASSOC)){
$hostess_ids[]=$row['hostess_id'];
}
$j=0;

foreach($hostess_ids as $hostess_selected){

$hostess_array= explode("-",$hostess_selected);

for ($j=0; $j&lt;count($hostess_array);$j++) {
$hst1=$hostess_array[$j];
echo var_dump($hst1);
$sql2="";       
</code></pre>

<p>}
}</p>

<p>This is the output</p>

<pre><code>   string(2) "17" string(2) "16" string(0) "" string(0) "" string(2) "17" string(2) "16" string(0) "" string(2) "17" string(2) "16" string(2) "17" string(2) "16" string(0) ""
</code></pre>

<p>If i do print_r i get this:</p>

<pre><code>1711611117116111711611711611
</code></pre>

<p>How can i iterate in this array to get the first cell values, but storing it not in a one dimensional arrays but in a two dimensional array, which means, i'll need to have two for conditions probably.
I know i riposted the question but now it's different the issue.</p>
