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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: snowdyyd at hotmail dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Mar 29 14:01:28 2024 UTC