|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16 problem print in a for loop....
Submitted: 1998-01-27 23:07 UTC Modified: 1998-02-12 01:04 UTC
From: Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0b3 OS: Solaris 2.5.1
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.
Bug Type:
New email:
PHP Version: OS:


 [1998-01-27 23:07 UTC]
/* Here is the the setup of my vars, the array is loaded
   up in some sql code not represented here.  It loads up

$fieldstr =     "id title prod_key filename bytes last_mod ".
                "loc_type status_type type_type ram hd_mb ".
                "sound_type mhz_type proc_type blurb";
$fieldarr = explode(" ", $fieldstr);

$arraylen = count($fieldarr); 

/* This for loop does not put put a "<BR>\n" at the end
   of every line.
for ($i = 0; $i < $arraylen; $i++) {
        $line = "$fieldarr[$i] = " . $$fieldarr[$i] . "<BR>\n";

/* but the following does */
for ($i = 0; $i < $arraylen; $i++) {
        $line = "<BR>\n$fieldarr[$i] = " . $$fieldarr[$i];

/* Any ideas? */ 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-12 01:04 UTC] rasmus
I am unable to reproduce this.  I am using the above script and it gives me <BR>'s after each line in
both loops.  Please try running this exact script.  Perhaps you overlooked something and aren't
telling us about all the factors.
 [2019-11-14 19:05 UTC]
Automatic comment from SVN on behalf of nikic
Log: Improve PHP_FLOAT_MIN doc

Patch by BenMorel.

Closes php/doc-en#16.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Feb 27 01:01:28 2024 UTC