Page 1 of 1

Quiz Question

Posted: Fri Jul 14, 2006 3:31 pm
by Ollie Saunders
No testing the code, now! That's cheating.

Code: Select all

$bar['5'] = 12;
$bar[5] = 10;

$foo = $bar['5'];

Posted: Fri Jul 14, 2006 3:53 pm
by RobertGonzalez
OK, I'll bite.

10.

PS And I didn't even cheat neither.

Posted: Fri Jul 14, 2006 4:00 pm
by Ollie Saunders
yep its 10.

I thought it was a good feature that I didn't know about till today.

Posted: Fri Jul 14, 2006 10:13 pm
by RobertGonzalez
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.

Posted: Sat Jul 15, 2006 4:33 am
by Ollie Saunders
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.

Posted: Sat Jul 15, 2006 6:01 pm
by RobertGonzalez
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.