How to embaded variables into html (URGENT)

Hi guys;

I’m running v8 (the last one) trying to make email news letter, to all members, pickup name and address and send email to all members,
but I’m not able to embaded name and address field into the html message body,

is there any suggestion or idea how can I use variables in html message body.

thanks in advance…
regards
Ahmer

hey ahmeranis:

It’s kinda easy man, do it by string replacement:

when you configure the html create some identifiable content for example Contact_Name then use the str_replace() function of php [link: http://php.net/str_replace] to do something like this


$Template= " all the html contect i can place including <a href="some adress"> _Contact_Name_ </a>"

$Template = str_replace( "_Contact_Name_" , {ContactName}, $Template);

this will search all the strings Contact_Name in the content of the $Template, then will replace them with the value of your field or variable {ContactName} and the result will be reassigned to the $Template variable

Hope this helps.

Regards

P.D.- Make sure of reviewing the str_replace manual so you understand what’s going on.

thanks kafecadm;

it works like charm,
AWESOME