PHP object get value from array -
i have written class this:-
class mail{ function register() { return array('message_subject'=>$message_subject,'message_content'=>$message_content); } }
then in main page, tried:-
echo mail::register();
and main page gave me values of "array".
how shall modify mail::register(); can receive "message_subject" , "message_content" respectively?
assign mail::register() variable , print because retruning array that. array printed print_f not echo
$mail = mail::register(); echo'<pre>'; print_r($mail); echo '</pre>'; ?>
Comments
Post a Comment