Re: Array
| From: | Andy Turegano | Date: | Mon, 16 Dec 2002 21:24:58 +0000 |
| Subject: | Re: Array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128480@lists.php.net to get a copy of this message | ||
What you have to do, at least I think, is you have to type:
$r = $monthschedule["Jun"];
That is what I think you have to do. The other way you did it was when you
have a value-only array.
On Mon, 16 Dec 2002, Mako Shark wrote:
> I have an array I set up like this:
>
> $monthschedule = array(1 => "Jan", 2 => "Feb", 3 =>
> "Mar", 6 => "Jun");
>
> When I try to access them, doing this:
> $r = $monthschedule[6];
>
> nothing comes up ($r is blank). Any thoughts? There
> are missing elements (4,5,7-12) in $monthschedule.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>