Jump to content

Putting data into array


gaza165

Recommended Posts

Im trying to place all my emails into in array so i reverse the array to display the emails in the order i would like.

 

can someone tell me where i am going wrong with this code??

 

 for($i = 1; $i < $numEmails+1; $i++)
{
$mailHeader = @imap_headerinfo($conn, $i);
$data[] = array("from"=> $mailHeader->fromaddress, "subject"=> $mailHeader->subject, "date" => $mailHeader->date);
}

foreach ($data as $value) {
	echo $value[0]->from;
}

Link to comment
https://forums.phpfreaks.com/topic/161685-putting-data-into-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.