Re: [PHP] Re:[PHP] imap_search and results

2004-08-26 Thread Greg Donald
On Thu, 2004-08-26 at 09:25, fongming wrote: > for($i=0;$i { > [EMAIL PROTECTED]($mbox,$mails[$x-1]); > echo $subject=$h->subject; > echo $sender=$h->from[0]; > echo ""; > } Calling count() every time the for loop iterates is inefficient. $count = count($mails); for($i=0; $i<$count; $i++){ }

Re: [PHP] imap_search and results

2004-08-26 Thread Nicolas Diez
On Thu, 26 Aug 2004 22:25:00 +0800, fongming <[EMAIL PROTECTED]> wrote: > Hello: > >Here is my code : > >/---/ > >$mails = imap_search($mbox, 'TO "gentoo-user->[EMAIL PROTECTED]"',SE_UID); > >echo sizeof($mails); > >/--/ > > You can start to parse the mailheader,mai

[PHP] Re:[PHP] imap_search and results

2004-08-26 Thread fongming
Hello: >Here is my code : >/---/ >$mails = imap_search($mbox, 'TO "gentoo-user->[EMAIL PROTECTED]"',SE_UID); >echo sizeof($mails); >/--/ You can start to parse the mailheader,mailbody... for($i=0;$isubject; echo $sender=$h->from[0]; echo ""; } Hi, nice to me

[PHP] imap_search and results

2004-08-25 Thread Nicolas Diez
Hello, I'm trying to make a small script to show mails on a imap server with a criteria. Here is my code : /---/ $mails = imap_search($mbox, 'TO "[EMAIL PROTECTED]"',SE_UID); echo sizeof($mails); /--/ The connection to the server is the working, the search also,