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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -