#40807 [Opn->Csd]: Syntax error in example code for imap_fetch_overview

From: Date: Thu, 15 Mar 2007 09:32:58 +0000
Subject: #40807 [Opn->Csd]: Syntax error in example code for imap_fetch_overview
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969375778@lists.php.net to get a copy of this message
ID: 40807 Updated by: rquadling@php.net Reported By: raja at aonic dot net -Status: Open +Status: Closed Bug Type: Documentation problem PHP Version: Irrelevant New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2007-03-14 20:08:56] 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) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40807&edit=1

« previous php.doc (#969375778) next »