ok this is an easy class function but i cant get the correct value..
CEmail.php
class Email
{
var $email;
var $password;
var $header;
var $message;
function Email($strEmail,$strPwd,$strHeader, $message )
{
$this->$email = $strEmail;
$this->$password = $strPwd;
$this->$header = $strHeader;
$this->$message = $strMessage;
}
function SendEmail()
{
return $this->$email;
}
} //end of Class Email
<?php
include 'CEmail.php';
$mail = new Email("ee@ee.com",123,"From:hhh","email test");
echo "$mail->header belong to $mail->email <br>";
echo $mail->SendEMail();
...
?>
the result however is:
belong to
email test.
Not accurate. why? it couldnt read the $header and email for the first echo and for the second echo i wanna get $email from function SendEMail() but they return $message..😕