PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Fri Jul 14, 2006 3:31 pm
No testing the code, now! That's cheating.
Code: Select all
$bar['5'] = 12;
$bar[5] = 10;
$foo = $bar['5'];
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Fri Jul 14, 2006 3:53 pm
OK, I'll bite.
10.
PS And I didn't even cheat neither.
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Fri Jul 14, 2006 4:00 pm
yep its 10.
I thought it was a good feature that I didn't know about till today.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Fri Jul 14, 2006 10:13 pm
It's talked about a little bit in the array section of the manual. In fact, I think a poster asked a question along these lines within the last few days.
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Sat Jul 15, 2006 4:33 am
It's talked about a little bit in the array section of the manual. In fact
yep it is. which is why its amazing i'd never noticed it before.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Sat Jul 15, 2006 6:01 pm
I have found so many things in the manual 'by accident' that I hadn't known about, you'd be amazed. I am constantly learning new stuff.