0
    $arrray = array(
        $this->_SmailerTyle => "PHPMailer",
        $this->_SsendMail   => "smtp",
        $this->from         => "[email protected]",
        $this->to           => "[email protected]",
        $this->subject      => "This is example subject",
        $this->message      => "This is example message",
        );
        print_r($arrray);

Any one help to convert a single array in multiple variables.

5
  • are you getting any error? Commented May 24, 2019 at 5:36
  • No Hemant But my out put Array ( [] => This is example message ) Commented May 24, 2019 at 5:36
  • remove $this-> and write 'message' Commented May 24, 2019 at 5:41
  • As it is trying to use $this->... as the index for each value, I assume that either these values are empty or do not exist. This then means that each value is overwriting the previous one and you end up with the array your getting. Commented May 24, 2019 at 5:45
  • Thank you for your response @NigelRen, this is one of key point for your comment. Commented May 24, 2019 at 5:53

1 Answer 1

1

find in your code where you are assigning values to the following properties

$this->_SmailerTyle
$this->_SsendMail
$this->from
$this->to
$this->subject
$this->message 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.