Jake wrote:
while($begin < $end)
{
if ($start == 'false')
{
if (empty($temp[$begin]))
{
$start = 'true';
}
}
else
{
$data .= chop($temp[$begin]) . "\n";
}
$begin++;
}
return "$from|$subject|$data";
}
You have got to be joking me. You're using STRING COMPARISONS when you
really want to use booleans? Hell, you even call them true and false, so
why not simply USE booleans??? The following cleans that up and makes
your loop actually many times faster, not to mention it properly uses
booleans as.... booleans...
while($begin < $end)
{
if ($start !== true)
{
if (empty($temp[$begin]))
{
$start = true;
}
}
else
{
$data .= chop($temp[$begin]) . "\n";
}
$begin++;
}
return "$from|$subject|$data";
}
I'm not sure what you intended this piece of code to do, but it looks
pretty hackish to me...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php