Hi,

No I don't think that is right.

$monthschedule["Jun"] is not what is being looked for, but 
$monthschedule[something]="Jun";

Try doing a loop to see what is in the array.

Example, from PHP Bible,

function print_keys_and_values_each($arr)
{
   reset($arr);
   while ($cell = each($arr))
   {
      $c = $cell['value'];
      $k = $cell['key'];
      print ("Key: $k; Value: $c<BR>");
   }
}


Quentin

-----Original Message-----
From: Andy Turegano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 17 December 2002 10:25 a.m.
To: Mako Shark
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Array


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
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you 
are asked to respect that confidentiality and not disclose, copy or make use 
of its contents. If received in error you are asked to destroy this email 
and contact the sender immediately. Your assistance is appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to