Pattern matching and replacement!

From: Date: Tue, 08 May 2001 08:03:35 +0000
Subject: Pattern matching and replacement!
Groups: php.general 
Request: Send a blank email to php-general+get-51869@lists.php.net to get a copy of this message
Hello all, I have a slight problem. I am storing an email template in a MySQL DB. Portions of the email have text that need to be replaced with variable values when run through the script. ex: <snip> Sehr geehrte(r) Frau/Herr {%Last_Name%} , Dies ist eine automatische Zusendung von ACNS Billing and Support Software. Ihre Zahlung von DM {%Prev_Total%} fuer ihr ACNS Domain und/oder ihr Internet Flatrate konto wurde von ihrer Bank uneingeloest zurueckgegeben. Daher moechten wir Sie bitten innerhalb der naechsten 4 werktage, dies zu begleichen. Werktage zaehlen ab dem {%Today_Date%}. Konto/Kunden #: {%Customer_ID%} Vorheriger Betrag: DM {%Prev_Total%} Mahngebuehr: DM 19,99 </snip> As you can see. I am using the {% and %} to delimit the parts that need to be replaced. I can't get the replacements to work right though. Can someone help? Thanks in advance. chuck

« previous php.general (#51869) next »