Amazing array with reference

Amazing array with reference

am 15.10.2007 04:00:15 von Yarco

What do you think about the differences of the result between
uncomment line3 or not.

$girls = array('Army', 'Bitney', 'Sandy');
// $the2nd_girl = & $girls[1]; // line 3
$boys_lovers = $girls;
$boys_lovers[1] = 'no body';

print_r($girls);
print_r($boys_lovers);

?>

:)

Re: Amazing array with reference

am 15.10.2007 08:35:36 von Steve

"Yarco" wrote in message
news:1192413615.624717.54370@y27g2000pre.googlegroups.com...
> What do you think about the differences of the result between
> uncomment line3 or not.
>
> > $girls = array('Army', 'Bitney', 'Sandy');
> // $the2nd_girl = & $girls[1]; // line 3
> $boys_lovers = $girls;

i don't know...too busy laughing that the army could have been one of the
boy's lovers!

;^)