Welcome Guest, Not a member yet? Register   Sign In
Inserting variable in an email?
#1

[eluser]anna16[/eluser]
Hello guys

I'm trying to insert a variable inside an email.

Is this correct?
Code:
$total = 50;

$this->email->message('Amount: $total');

I tried it but it doesn't worked.
what is the proper way?

Thanks in advanced?
#2

[eluser]Siddhesh[/eluser]
Code:
$total = 50;

$this->email->message('Amount: $total');

Use

Code:
this->email->message("Amount: $total");

It will work as variable substitution is not allowed for the string in single quote.




Theme © iAndrew 2016 - Forum software by © MyBB