note 108014 added to function.imap-fetchstructure
| From: | gguurruuatgmaildotcom | Date: | Thu, 22 Mar 2012 11:14:54 +0000 |
| Subject: | note 108014 added to function.imap-fetchstructure | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186770@lists.php.net to get a copy of this message | ||
raulggonzalez function works very well.
Here's a little tweak to return the attachments array instead of a single boolean value.
function getAttachments($part){
$arr = array();
if (isset($part->parts)){
foreach ($part->parts as $partOfPart){
foreach(getAttachments($partOfPart) as $val){
$arr[] = $val;
}
}
}
else{
if (isset($part->disposition)&& $part->disposition ==
'attachment'){
$arr[] = $part->dparameters[0]->value;
}
}
return $arr;
}
----
Server IP: 69.147.83.197
Probable Submitter: 77.205.1.235
----
Manual Page -- http://www.php.net/manual/en/function.imap-fetchstructure.php
Edit -- https://master.php.net/note/edit/108014
Del: integrated -- https://master.php.net/note/delete/108014/integrated
Del: useless -- https://master.php.net/note/delete/108014/useless
Del: bad code -- https://master.php.net/note/delete/108014/bad+code
Del: spam -- https://master.php.net/note/delete/108014/spam
Del: non-english -- https://master.php.net/note/delete/108014/non-english
Del: in docs -- https://master.php.net/note/delete/108014/in+docs
Del: other reasons-- https://master.php.net/note/delete/108014
Reject -- https://master.php.net/note/reject/108014
Search -- https://master.php.net/manage/user-notes.php