Forum Moderators: coopster

Message Too Old, No Replies

replacing some sort of variable with value

replacing some sort of variable with value

         

vivek avasthi

5:24 am on Jul 10, 2006 (gmt 0)

10+ Year Member



i have made a email system.. where i have stored some database field value like

email,lastname,compnay & name field as

%PERS_Email%
%PERS_LastName%
%PERS_Company%
%PERS_Name% in textarea wth some other text like "

dear user your first name is %PERS_Name% last name is %PERS_LastName% , your email is %PERS_Email% and your company name is %PERS_Company%

now i want to replace these value

%PERS_Email%
%PERS_LastName%
%PERS_Company%
%PERS_Name%

with database field values.... anyone help me...

Sekka

9:42 am on Jul 10, 2006 (gmt 0)

10+ Year Member



$myEmail = str_replace ("searchstring", "replacestring", $myEmail);

"searchstring" will be the codes you have given.
"replacestring" will be your database value.

Just repeat for each field and each email.