note 14126 added to function.ftp-rawlist.php
| From: | woprog at php2 dot chek dot com | Date: | Wed, 18 Jul 2001 11:07:53 +0000 |
| Subject: | note 14126 added to function.ftp-rawlist.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15533@lists.php.net to get a copy of this message | ||
You can use the following function to easily divide a rawlist-row into pieces... the function
returns an array
function strip_rawlist_line($row)
{
$part = strtok($row, " ");
$len = strlen($part)+1;
while ($len < strlen($row))
{
$result[] = $part;
do
{
$part = strtok(" ");
$len++;
}
while ((strlen($part)==0) || ($len >= strlen($row)));
$len += strlen($part);
}
if ($part)
$result[] = $part;
return $result;
}
http://www.php.net/manual/en/function.ftp-rawlist.php