Re: objects within arrays
| From: | Andrew Brampton | Date: | Tue, 24 Dec 2002 18:53:36 +0000 |
| Subject: | Re: objects within arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129304@lists.php.net to get a copy of this message | ||
Big guess but I think maybe:
$header[0]->from['mailbox'];
Also I suggest you turn your PHP Error Level up to E_ALL in your php.ini
file (or temporarly at the top of your scripts with error_reporting
(E_ALL);, this will help debug programs like this :))
Andrew
----- Original Message -----
From: "Beth Gore" <bethgore@tesco.net>
To: "PHP General List" <php-general@lists.php.net>
Sent: Tuesday, December 24, 2002 6:42 PM
Subject: [PHP] objects within arrays
> Hi,
>
> I'm really struggling with this - I'm writing a simple webmail client
> for myself (because they've blocked the common ones at work hehe)
>
> Anyway, as soon as I tried to access..
>
> $header = imap_header($inbox,$msgID);
>
> $header->from['mailbox'];
>
> ... I get nothing.
>
> I did a print_r on that, and I got..
>
> Array ([0] = StdClass Object([personal] = "blah" ); etc...
>
> so how do I access the data within the Object bit? a simple
> $header->from['personal'] refuses to output anything.
>
> Sorry to be a pain again, I know this is simple language stuff but I
> can't find it in the manual. :)
>
> Beth Gore
> --
> http://www.habitformer.co.uk
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>