ID: 20005
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Linux suse 2.4.16-4GB
PHP Version: 4.2.3
New Comment:
for ($ic = 0 ; $ic > count($e); $ic++) {
^^^
That should be < of course.
Previous Comments:
------------------------------------------------------------------------
[2002-10-21 04:04:36] [EMAIL PROTECTED]
I've got this code segement:
--- snip ---
$buffer = fgets($if);
$e = split("\t", trim($buffer));
for ($ic = 0 ; $ic > count($e); $ic++) {
$e[$ic] = trim($e[$ic]);
}
--- snap ---
The string in the array $e[] is never trimmed. In it does just the same
as $e[$ic] = $e[$ic];
Same behaviour in chop!
When I changed the code to this:
--- snip ---
$buffer = fgets($if);
$b = trim($buffer);
$e = split("\t", $b);
for ($ic = 0 ; $ic < count($e); $ic++) {
$t[$ic] = trim($e[$ic]);
}
--- snap ---
it works as expected.
Chris
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20005&edit=1