php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3428 explode, split, nl2br malfunction
Submitted: 2000-02-08 13:09 UTC Modified: 2000-02-11 20:17 UTC
From: petr dot husak at meiller dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 OS: hpux 10.20
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: petr dot husak at meiller dot com
New email:
PHP Version: OS:

 

 [2000-02-08 13:09 UTC] petr dot husak at meiller dot com
Skript below shows result of lpstat but without newlines.
It seems that explode doesn't work and $result is copied to $view[0] as is. The same problem was with 

$view split("\n",$result) and similar with nl2br.

<?
        $result = passthru("lpstat -t");
        $view = explode("\n",$result);
                    
        for($i=0; $i<sizeof($view); $i++){
            echo "$view[$i]" . "<br>\n";
        }            
?>
                   

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-11 20:17 UTC] andrei at cvs dot php dot net
Should be fixed in CVS. But passthru() is not supposed to return
anything, which it was doing by mistake.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 17:01:29 2024 UTC