note 69688 deleted from function.ftp-rawlist by crell

From: Date: Thu, 31 Mar 2022 19:18:36 +0000
Subject: note 69688 deleted from function.ftp-rawlist by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217899@lists.php.net to get a copy of this message
Note Submitter: kerbpm ---- Your code is ok, just replace $i = 0 instead of 1 Thank you <?php function parse_rawlist( $array ) { for ( $i = 1; $i < count($array); $i++ ) { $current = $array[$i]; $structure[$i]['perms'] = substr($current, 0, 10); $structure[$i]['number'] = trim(substr($current, 11, 3)); $structure[$i]['owner'] = trim(substr($current, 15, 8)); $structure[$i]['group'] = trim(substr($current, 24, 8)); $structure[$i]['size'] = trim(substr($current, 33, 8)); $structure[$i]['month'] = trim(substr($current, 42, 3)); $structure[$i]['day'] = trim(substr($current, 46, 2)); $structure[$i]['time'] = substr($current, 49, 5); $structure[$i]['name'] = substr($current, 55, strlen($current) - 55); } return $structure; } ?>

« previous php.notes (#217899) next »