I am storing info in an array in a loop like that:
while ($ind = mysql_fetch_array($result))
$array["uniqueName"][$ind][$hash]["mac"] = $mac;
How can I get all $mac's if I am not given $hash, so by all hashes in context:
$array["uniqueName"][432][?]["mac"]
What can I do with '?' above? Can I omit that somehow?
you can loop over the hash keys like this:
$macs = array();
foreach($array["uniqueName"][$ind] as $hash){
array_push($macs, $hash["mac"]);
}
Update from comment:
The foreach statement loads every key $array["uniqueName"][$id] contains into the $hash variable, one by one. So you don't have to know what these keys actually are (or even if there are any), you can just use them by referring to them using the $hash var. So in effect, that foreach statement loops over all keys $array["uniqueName"][$id] contains.