Re: Menu populated based on previous menu
| From: | Robb Kerr | Date: | Tue, 28 Oct 2003 18:02:50 +0000 |
| Subject: | Re: Menu populated based on previous menu | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167905@lists.php.net to get a copy of this message | ||
On Tue, 28 Oct 2003 09:52:02 -0800, Pablo Gosse wrote:
> Hi Robb. This is exactly what you'll need to do.
>
> Something like the following, assuming you're populating an array with
> user information:
>
> <script type="text/javascript">
> <!--
> var users = new Array();
> <?php
> $count = 0;
> while (!$users->EOF))
> {
> echo 'users['.$count.'] =
> '.$users->fields['username'].chr(10);
> $count++;
> $users->MoveNext();
> }
> ?>
> //-->
> </script>
>
> The users array will now be populated with the usernames returned from
> your query.
>
> Cheers,
> Pablo
>
Thanx Pablo. I'll give that a try.
--
Robb Kerr
Digital IGUANA