php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19285 foreach runs only 1 time
Submitted: 2002-09-07 12:49 UTC Modified: 2002-09-07 13:28 UTC
From: snowdyyd at hotmail dot com Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 4.2.3 OS: windows
Private report: No CVE-ID: None
 [2002-09-07 12:49 UTC] snowdyyd at hotmail dot 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. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-07 13:28 UTC] kalowsky@php.net
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.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 11:01:27 2024 UTC