On Mon, 22 Jan 2001, Brian V Bonini wrote:
> That's what I thought, which seemed to be the obvious
> however, when I tried that it returns an error.
>
> "Warning: Variable passed to each() is not an array or object in pagetop.inc
> on line 105"
>
> PHP Version 4.0B2
> BSDI BSD/OS 4.0.1
> Zend Engine v0.90,
>
I reimplemented your snippet from first principles, and here's what I came up
with (reformatted and XHTMLized):
<table>
<?php
$bikes = array(
"Road" => array(
"Trek 5200" => "URL",
"Schwinn Fastback Pro" => "URL",
"Va Moots" => "url"
),
"Mountain" => array(
"Trek Fuel 90" => "url",
"Schwinn Homegrown" => "url"
),
"BMX" => array(
"Haro Mira 540" => "url",
"Schwinn Powermatic Pro" => "url"
),
"Kids" => array(
"Schwinn Tiger" => "put URL here",
"Schwinn Bumblebee" => "URL"
)
);
while (list($val, $key)=each($bikes["Road"]))
{
?>
<td><img src="images/spacer.gif" width="25" height="1" alt="" border="0" /></td>
<td><a href="<?=$key?>" class="menu"><?=$val?></a></td>
<?php
};
?>
</table>
Works perfectly.
--
Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]