PHP output variable

Below is my code:

$mail->AddReplyTo(‘’, ‘$elang23’);

The script im using only allows use of single quotes, but im trying to output $elang23. Instead of outputting the information in the variable it just outputs $elang23. What is a good way to solve this?

Hi Mike,

Just remove the quotes around the variable name and PHP will substitute the value when the script runs:

$mail->AddReplyTo('', $elang23);

Actually the double quote " " works fine too, single quote does not execute PHP variables though which can be a bit confusing for newbies.

I’m curious. What do you mean by “script im using only allows use of single quotes”?

thanks it works without quotes, it was for the phpmailer script