php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2376 Minor inconsistency between PHP3 and PHP4 on while each loops
Submitted: 1999-09-24 13:07 UTC Modified: 1999-09-24 16:36 UTC
From: mbushey at virtualintensity dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Beta 2 OS: Linux 2.2.5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mbushey at virtualintensity dot com
New email:
PHP Version: OS:

 

 [1999-09-24 13:07 UTC] mbushey at virtualintensity dot com
Under PHP3 I could do a while each loop, and to reset the varable on the each loop I could set $var = $var;  This no longer works on PHP4, but $tmp = $var; $var = $tmp; does however. Perhaps there is a better way to reset the pointer and I am doing it wrong it the 1st place...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-24 16:36 UTC] riffraff at cvs dot php dot net
just use reset()

http://bugs.php.net/manual/function.reset.php3

  Jakub
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 10:00:02 2026 UTC