why would these few statements writes the array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$array = array(1,2,3);
foreach( $array as &$item );
foreach( $array as $item );
print_r( $array );

foreach is a read, not a write, isn't it?

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   17:09:01 up 8 days 4:21 1 user load average: 1.10 1.03 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux