I'm having array block, trying to format the data in a two dimensional associative array.
foreach($menu as $k => $v) { etc..
need to end up with <a href=url title=title>link(x)</a>
Since it's two-dimensional, the $v you're getting is actually an array. So you'll have to iterate through the outer array, $menu, and then do it again for each inner array.
As was mentioned before/elsewhere, a for would be more efficient than a foreach unless you actually need a specific key or value. So something like
$count = sizeof($menu); for ( i=0; i<$count; i++) { foreach( array_shift($menu) as $k => $v ) { //ect. } }
It's been a long day; please, someone verify this... :)
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php