Here is the code, Im attempting to get the part of the code trimmed down to one line.
Here is preliminary code (its IMAP stuff):
$mailbbox = imap_open(--Connetion stuff--);
--foreach loop with $x as the counter--
$headers = imap_header($mailbox, $x);
I am attempting to get the following to one line, anyone have any suggestions?
$From = $headers->sender;
$From = get_object_vars($From[0]);
--
The point is that first line: $headers is an object and $headers->sender is an array of objects.
Is there anyway I can access sender array element 0 on one line, ive tried things like:
$From = $headers->sender[0]
But it doesnt work, but it also dosnt give a parse error, is there anything similar i can use?