Well I have something like
$Arr1 = array("a1" => array("a1b", "a1b"),
"a2" => array("a2b", "a2b"),
"a3",
"a4",
"a5" => array("a5b", "a5b")
);
meaning that "a3" and "a4" are keys without values.
I need to go through a foreach loop to get $key => $value
pairs.
Should be something with checking of isset($value)
but it doesn't work.
UPDATE: Question is closed. Thanks to all. As it was written key without value is not a key, but value with a default integer key. So if anyone wants to use the structure above make this
foreach ($Arr1 as $key => $value) {
if (is_int($key)) {
$key = $value;
$value = null;
}
//use $key and $value
}