RE: [PHP] array confusion...

2003-11-24 Thread Dan Joseph
Hi, > I think you might have some letter 'O's instead of the number 0. Notice > that you have CO1 and C01 when you print_r. They are different keys. I think you are correct! hahaha... oh man, one of those Mondays! Thank you sir! -Dan Joseph -- PHP General Mailing List (http://www.ph

Re: [PHP] array confusion...

2003-11-24 Thread Brad Pauly
On Mon, 2003-11-24 at 13:42, Dan Joseph wrote: > Hi, > > I must be missing something in this array. To me this makes no sense. > Here is it broken down... > > Declartion: > > $gtotals = array( > "CO1" => 0, > "CO2" => 0, > "CO3" => 0,

Re: [PHP] Array confusion.

2001-03-22 Thread Sterling
H- Thanks to all that wrote in with input on this issue. I really appreciate the assistance. Thanks to CC Zona and James for the code sample. It looks like there were typo's in my code and it threw me for a minute after recieving/applying all the emails. That backslash wasn't suppose to be i

RE: [PHP] Array confusion.

2001-03-22 Thread Altunergil, Oktay
You can do this instead.. $month[] = array("Jan","Feb" .."Dec"); $m = 3; $real_m = $m-1 echo "Month= $month[$real_m]; //Mar You can also have PHP assign the first element of the array to index 1 instead of 0.. I think you accomplish that by doing something like $month[] = array(1=>Jan,Feb,M

Re: [PHP] Array confusion.

2001-03-22 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Sterling) wrote: > $m = "03"; > $list = array(01=>"Jan", 02=>"Feb", 03=>"Mar", 04=>"Apr", 05=>"May", > 06=>"Jun", 07=>"Jul", 08=>"Aug", 09=>"Sep\", 10=>"Oct", 11=>"Nov", > 12="Dec"); > $month = $list[$m]; > print "$month\n"; > > What I want