Posted by Jason Wong on 01/31/05 03:10
On Monday 31 January 2005 07:09, news.php.net wrote:
> $as = array();
> $a10 = "10";
> $a20 = "20";
>
> $a = &$a10;
> $arr[] = &$a;
> $a = &$a20;
> $arr[] = &$a;
>
> print_r($arr);
> foreach($arr as $a)
> {
> echo $a;
> }
If you do:
foreach($arr as $b)
{
echo $b;
}
then it will work as you expect it.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts
[Back to original message]
|