PHP 4.0 Bug #3428: explode, split, nl2br malfunction
| From: | petr dot husak at meiller dot com | Date: | Tue, 08 Feb 2000 12:09:41 +0000 |
| Subject: | PHP 4.0 Bug #3428: explode, split, nl2br malfunction | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15299@lists.php.net to get a copy of this message | ||
From: petr.husak@meiller.com
Operating system: hpux 10.20
PHP version: 4.0 Beta 3
PHP Bug Type: Scripting Engine problem
Bug description: explode, split, nl2br malfunction
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";
}
?>