Everytime I pass post array data it overwrites itself every time a new selection is passed. I want it to add to the previous selection and keep growing.
Im banging my head trying to work this out, is it due to the array thats passed not having enough dimensions or the right key??
echo '<input type="checkbox" id ="menu" name="'.$did.'['.$result2['cid'].']'.'['.$result2['id'].']" value="'.$result2['id'].'">'.ucwords($result2['name']).'<br />';
if($array){
foreach ($array as $key => $value){
if(is_array($value)){
foreach ($value as $key => $value){
$query = mysql_query("SELECT title FROM menuCategory WHERE cid = $key");
$result = mysql_result($query,0);
echo '<h1>'.ucwords($result).'</h1>';
foreach ($value as $key => $value){
echo '<input type="hidden" name="'.$key.'" value ="'.$value.'">';
$query = mysql_query("SELECT cid, id, name FROM menuBread WHERE id = $value");
$result = mysql_fetch_assoc($query);
echo ucwords($name = $result['name']).'<br />';
}
}
}
}
}