RE: [PHP] Re: array block

2004-01-31 Thread Shawn McKenzie
'href' => 'foo', 'title' => 'bar', 'style' => 'amet' ) ); foreach ($menu as $array) { $tag = " $v) { $tag .= " $k=\"$v\"&

Re: [PHP] Re: array block

2004-01-31 Thread Brian V Bonini
On Fri, 2004-01-30 at 22:48, Shawn McKenzie wrote: > You would need to give an example of what you mean by change dynamically, > because if you can't predict the key indexes then how can you know which > ones to use in your anchor tag? say this: $menu = array ( 'link1' => array(

Re: [PHP] Re: array block

2004-01-31 Thread Jason Wong
On Saturday 31 January 2004 11:48, Shawn McKenzie wrote: > You would need to give an example of what you mean by change dynamically, > because if you can't predict the key indexes then how can you know which > ones to use in your anchor tag? foreach ($arr as $key => $value) { echo "Key: $k

Re: [PHP] Re: array block

2004-01-30 Thread Shawn McKenzie
You would need to give an example of what you mean by change dynamically, because if you can't predict the key indexes then how can you know which ones to use in your anchor tag? -Shawn "Brian V Bonini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] -- PHP General Mailing List (htt

Re: [PHP] Re: array block

2004-01-30 Thread Brian V Bonini
On Fri, 2004-01-30 at 18:47, Shawn McKenzie wrote: > Sorry, $k should be $text. > > foreach ($menu as $text => $array) { > $url = $array['url']; > $title = $array['title']; > > echo "$text\n"; > } > Gotcha, thanks! That'll work for this but for arguments sake what if the inner array were to