php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #40807 Syntax error in example code for imap_fetch_overview
Submitted: 2007-03-14 20:08 UTC Modified: 2007-03-15 09:32 UTC
From: raja at aonic dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2007-03-14 20:08 UTC] raja at aonic dot net
Description:
------------
There is an syntax error in Example 966. imap_fetch_overview()

<?php
// Fetch an overview for all messages in INBOX
$result = imap_fetch_overview($mbox,"1:{$MC->Nmsgs}",0);
foreach ($result => $overview) {
   echo "#{$overview->msgno} ({$overview->date}) - From: {$overview->from}
   {$overview->subject}\n";
}
?>

foreach ($result => $overview) should be: 
foreach ($result as $overview)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-15 09:32 UTC] rquadling@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 19:01:32 2025 UTC