another newbie question! (doh!)

From: Date: Thu, 30 Jan 2003 13:20:19 +0000
Subject: another newbie question! (doh!)
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3525@lists.php.net to get a copy of this message
Hi again, ok - I've managed to work around the Mail_Mime install issue, but downloading the package and copying the php files into the pear\Mail folder! But I've now got a weird problem for you experts! :) Given this code: $params['include_bodies'] = TRUE; $params['decode_bodies'] = TRUE; $params['decode_headers'] = TRUE; $decoder = new Mail_mimeDecode($Message); $MailParts = $decoder->decode($params); while (list ($key,$value) = each ($MailParts)) { echo "<br>$key=$value"; echo "$MailParts[$key]"; if ($key == 'headers') { $headers = $value; } } DebugPrintArrayValues($headers,true); Perhaps someone can tell me why I can't access the elements of $MailParts with the key! i.e. isset($MailParts['headers']) will return false - even the <echo "$MailParts[$key]";> code in hte while loop will not echo anything to the screen. But I can get the values out by looping around them all and putting them into vars (as I've done with $headers). Just a weird thing I've found - wondered if anyone had any suggestions as its flumexed me. Cheers! Steve Childs.

« previous php.pear.general (#3525) next »