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++){ }

[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