Re: why would these few statements writes the array?
| From: | Man-wai Chang | Date: | Sun, 01 Apr 2007 11:33:36 +0000 |
| Subject: | Re: why would these few statements writes the array? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251884@lists.php.net to get a copy of this message | ||
Man-wai Chang wrote:
> $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?
I got 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
^ ^ 19:33:01 up 8 days 6:45 0 users load average: 1.00 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk