note 88466 deleted from function.imap-fetch-overview by didou
| From: | didou@php.net | Date: | Mon, 26 Oct 2015 14:19:00 +0000 |
| Subject: | note 88466 deleted from function.imap-fetch-overview by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-204031@lists.php.net to get a copy of this message | ||
Note Submitter: Ben
----
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.