Take a look at this piece of code:
$array = array(
"Main 1" => array(
"Sub 1" => "Sub 1",
"Sub 2" => "Sub 2"
),
"Main 2" => array(
"Sub 1" => "Sub 1",
"Sub 2" => "Sub 2"
)
);
foreach ($array as $key => $val) {
echo $key.'<br>';
$count = count($val);
foreach ($val as $k => $v) {
echo '- '.$k.'<br>';
if ($val != 1) { echo '<hr>'; }
}
}
I know this doesn't do what I want it do 🙂
I want to echo <hr> between ALL subarrays, not after the last, just between them ...
Got it? 🙂
I know this doesn't work, so don't tell me what I'm do wrong, please, tell me how to fix this 🙂
With thanks in advance, Arni