Re: References in an array
| From: | Richard Lynch | Date: | Fri, 19 Jan 2001 17:58:47 +0000 |
| Subject: | Re: References in an array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35672@lists.php.net to get a copy of this message | ||
> $overview = imap_fetch_overview($mbox, "1:$last", 0);
> $IDs = array();
> $i = 0;
>
> foreach($overview as $val){
> $IDs[$i][0] = $val->message_id;
> $IDs[$i][1] = &$val;
> $i++;
> }
>
> echo "<table border=\"1\">";
> foreach($IDs as $val){
> echo "<tr><td>" . $val[1]->subject .
> "</td></tr>";
> }
> echo "</table>";
>
> Unfortunately I only get an empty table; the subject of the referenced
> header is not printed in the HTML-Code. Where's the error in my thinking ?
I'm not seeing anything to explain why you don't get your subject, but I do
wonder why you iterate through your $overview array to build an $ID array so
you can iterate through that to write out your table...
Would it not make more sense to just iterate through $overview, writing out
the HTML as you go?
By Day: |By Night:
Don't miss the Zend Web Store's | There's not enough room here...
Grand Opening on January 23, 2001! | Start here:
http://www.zend.com | http://l-i-e.com/artists.htm