note 88466 added to function.imap-fetch-overview
| From: | Ben at osu1 dot php dot net | Date: | Mon, 26 Jan 2009 01:12:11 +0000 |
| Subject: | note 88466 added to function.imap-fetch-overview | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149764@lists.php.net to get a copy of this message | ||
Just a quick note, in case anyone else has this trouble.
Remeber that imap_fetch_overview returns an array! So even if you call it for only one message,
you'll still need to pick out the first element.
<?php
// fetch overview:
$overview = imap_fetch_overview($handle, $uid, FT_UID);
// echo out, e.g., from field:
echo htmlspecialchars($overview[0]->from);
// ^^^ note the index!
?>
It may seem like a stupid error, but I spent a good half hour wondering why it wasn't working
until I var_dump'ed $overview.
----
Server IP: 117.104.160.194
Probable Submitter: 121.220.198.195
----
Manual Page -- http://www.php.net/manual/en/function.imap-fetch-overview.php
Edit -- https://master.php.net/note/edit/88466
Del: integrated -- https://master.php.net/note/delete/88466/integrated
Del: useless -- https://master.php.net/note/delete/88466/useless
Del: bad code -- https://master.php.net/note/delete/88466/bad+code
Del: spam -- https://master.php.net/note/delete/88466/spam
Del: non-english -- https://master.php.net/note/delete/88466/non-english
Del: in docs -- https://master.php.net/note/delete/88466/in+docs
Del: other reasons-- https://master.php.net/note/delete/88466
Reject -- https://master.php.net/note/reject/88466
Search -- https://master.php.net/manage/user-notes.php