You are here: Re: [PHP] Re: Still cnanot figure out with much easier example... « PHP « IT news, forums, messages
Re: [PHP] Re: Still cnanot figure out with much easier example...

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация