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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2020 The PHP Group
All rights reserved.
Last updated: Wed Sep 30 09:01:23 2020 UTC