$meta[0] = "001";
for ($j=0; $j<=count ($meta); $j++){
$query = "select ic_no from mem_data where sp_ic = '$meta[$j]'";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
$meta[] = $row["ic_no"];
$children[] = $row["ic_no"];
}
$children2 = $children;
$child = array ( $meta[$j] => array $children2) ); //Main Problem, it's an associative array
Unset ($children);
}
}
reset ($child);
while (list($key,$value) = each ($child)){
echo "Parent: $key ;Child:$value<br>\n";
}//Primary print method
/foreach ( $child as $key ){
echo "<BR>",$key, "<BR>",$val,"<BR>";
echo "parent2:W";
}///Alternative print method
(Both of the print method return me a blank page including this one
foreach ( $child as $key=>$val ){
echo $key, "<BR>";
foreach ($val as $val2){
echo "-->",$val2;
}
}
what is the problem? And it's there any guide to talk about associative array?)
Thanks for your assistance and good day.