Re: [PHP] Re: Still cnanot figure out with much easier example...

2005-01-30 Thread Jason Wong
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

Re: [PHP] Re: Still cnanot figure out with much easier example...

2005-01-30 Thread Marek Kilimajer
news.php.net wrote: Just compare the output of print_r($arr) and foreach(...)... !!! Please, explain, or my understanding of the php is gonna ruin. Thanx, Mark. $a = &$a10; $arr[] = &$a; $a = &$a20; $arr[] = &$a; print_r($arr); foreach($arr as $a) { echo $a; } ?> You can file this a

[PHP] Re: Still cnanot figure out with much easier example...

2005-01-30 Thread news.php.net
Just compare the output of print_r($arr) and foreach(...)... !!! Please, explain, or my understanding of the php is gonna ruin. Thanx, Mark. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php