Announcement

Collapse
No announcement yet.

How to embaded variables into html (URGENT)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Website Design

  • #2
    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

    PHP Code:
    $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.

    Comment


    • #3
      thanks kafecadm;

      it works like charm,
      AWESOME
      Website Design

      Comment

      Working...
      X