Page is a not externally linkable
astupidname - 7:39 am on Feb 20, 2010 (gmt 0)
Good advice from Readie about the array syntax, but a small correction should be made to the looping. It would be bad practice to mix property access and indexable access and have them rely on each other matching up. Should be:
$pics = Array(
"Mm" => Array(
'darkone.png',
'forestone.png',
'metalone.png',
'parchmentone.png',
'redwood.jpg'
),
"Nm" => Array(
'ci_teal.jpg'
),
"Am" => Array(
'back.jpg',
'backvx.jpg',
'backxp.jpg',
'simplegreen.jpg',
'simplered.jpg'
)
);
foreach($pics as $key => $val) {
echo '<p>[' . $key . ']<br />';
foreach($val as $pi) {
echo '- ' . $pi . '<br />';
}
echo '</p>';
}