|
Posted by Janwillem Borleffs on 11/02/05 22:28
Ian B wrote:
> $stuff["phone"]="0123456789";
> // 0, 14, 15, 16
> // but $stuff[16] get you the same thing as $stuff['phone']
>
No, it won't. Index 16 will not be defined unless specified. If you want
$stuff[16] to return the same value as the 'phone' key, you should define
both:
$stuff['phone'] = 12345;
$stuff[16] =& $stuff['phone'];
$stuff['phone'] =& $stuff[16];
$stuff['phone'] .= 6;
$stuff[16] .= 7;
print $stuff[16]; // 1234567
print $stuff['phone']; // 1234567
JW
Navigation:
[Reply to this message]
|