-1
This code returns me several values of the database:
while($TiV = $frm_interesse->fetch()){
echo $TiV['CODIGO'];
}
... and I need to send these values by e-mail with the PHPMailer
. I need some help to get the following result:
You have viewed the property with code 1234
You have viewed the property with code 5678
You viewed the property with code 9012
You viewed the property with code 3456
How could I for example put these values inside a variable separated by a space and then explode and do whatever I want with them?
I don’t know if it’s a good question but how do I give a
echo
in$codigos
within the script ofPHPMailer
?– Marcos Vinicius
You don’t have to echo, you insert the $variable in the body of the email.
$corpodoemail = "Olá, visitante! " . $codigos;
and then according to the Phpmailer documentation you insert $corpodoemail in the right place. There are examples of using Phpmailer here on the site itself, just a quick search.– Bacco