Date: 11/30/01
- Next message: faeton: "Re[4]: [PHP] Re: system(), flush() and so on..."
- Previous message: Jim Musil: "Re: [PHP] Stuck on array, need a little help."
- In reply to: Jim Musil: "Re: [PHP] Stuck on array, need a little help."
- Next in thread: Jim Musil: "RE: [PHP] Stuck on array, need a little help."
- Reply: Jim Musil: "RE: [PHP] Stuck on array, need a little help."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
No, all that will do is reverse the placement
of the values. So now it prints out Array
and puts the item in the URL. Still the same problem.
> -----Original Message-----
> From: Jim Musil [mailto:jim <email protected>]
> Sent: Friday, November 30, 2001 4:54 PM
> To: b-bonini <email protected>
> Cc: php-general <email protected>
> Subject: Re: [PHP] Stuck on array, need a little help.
>
>
> Your script is working like you are asking it to ...
>
>
> Change ...
>
> while (list($val, $key)=each($bikes[$sub_cat])) {
>
> To ...
>
> while (list($key, $val)=each($bikes[$sub_cat])) {
>
> and it should work like you WANT it to ...
>
> >I'm stuck. $key returns "Array" how can I get at each
> >level of this array?
> >
> >if ($cat == 'bikes' && $sub_cat != 'Road') {
> > while (list($val, $key)=each($bikes[$sub_cat])) {
> > echo "<TD><IMG SRC=\"images/spacer.gif\" WIDTH=\"25\"
> HEIGHT=\"1\"
> >ALT=\"\" BORDER=\"0\"></TD>\n";
> > echo "<TD><A HREF=\"$key\" CLASS=\"menu\">$val</A></TD>\n";
> >
> >$bikes = array(
> > "Road" => array(
> > "Trek" => array(
> > "Trek 5200" => "road.php?brand=t5200"
> > ),
> > "LeMond" => array(
> > "Zurich" => "road.php?brand=zurich",
> > "Chambery" => "road.php?brand=chambery",
> > "Alpe d'Huez" => "road.php?brand=alpe",
> > "BuenosAries" => "road.php?brand=bueno",
> > "Tourmalet" => "road.php?brand=tourmalet"
> > ),
> > "Moots" => array(
> > "VaMoots" => "road.php?brand=vamoots"
> > )
> > ),
> > "Mountain" => array(
> > "Trek" => array(
> > "Fuel 100" => "mountain.php?brand=tfuel90",
> > "Fuel 90" => "mountain.php?brand=schhg"
> > ),
> > "Klein" => array(
> > "bike 1" => "URL",
> > "bike 2" => "URL"
> > ),
> > "Gary Fisher" => array(
> > "bike 1" => "URL",
> > "bike 2" => "URL"
> > ),
> > "Moots" => array(
> > "bike 1" => "URL",
> > "bike 2" => "URL"
> > )
> > ),
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> >For additional commands, e-mail: php-general-help <email protected>
> >To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
> --
> Jim Musil
> ---------
> Multimedia Programmer
> Nettmedia
> -------------
> 212-629-0004
> jim <email protected>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: faeton: "Re[4]: [PHP] Re: system(), flush() and so on..."
- Previous message: Jim Musil: "Re: [PHP] Stuck on array, need a little help."
- In reply to: Jim Musil: "Re: [PHP] Stuck on array, need a little help."
- Next in thread: Jim Musil: "RE: [PHP] Stuck on array, need a little help."
- Reply: Jim Musil: "RE: [PHP] Stuck on array, need a little help."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

