#19285 [Opn->Bgs]: foreach runs only 1 time

From: Date: Sat, 07 Sep 2002 18:28:08 +0000
Subject: #19285 [Opn->Bgs]: foreach runs only 1 time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18632@lists.php.net to get a copy of this message
 ID:               19285
 Updated by:       kalowsky@php.net
 Reported By:      snowdyyd@hotmail.com
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: windows
 PHP Version:      4.2.3
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



Previous Comments:
------------------------------------------------------------------------

[2002-09-07 12:49:29] snowdyyd@hotmail.com

The problem is that I used a foreach on $DBfile that =
file("DBfile.txt"); (that file has 14 lines)
like this: foreach ($DBfile as $DBrida) {
but the foreach ran only 1 time (i checked it with echos)
the possible problem was that it had too many operations in it
including other foreach'es. (and there were no errors)
I replaced the foreach with a counter and while loop and the script
worked perfectly. 

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19285&edit=1



Thread (2 messages)

« previous php.bugs (#18632) next »