Re: [PHP] find and replace in php

2002-07-02 Thread Henry
Perfect Thankyou Henry "Erik Price" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Tuesday, July 2, 2002, at 01:52 PM, Henry wrote: > > > Imagine I have a piece of text > > > > "Dear [firstname] > > > > Thankyou for purchasing [product] on [date]. > >

Re: [PHP] find and replace in php

2002-07-02 Thread Erik Price
On Tuesday, July 2, 2002, at 01:52 PM, Henry wrote: > Imagine I have a piece of text > > "Dear [firstname] > > Thankyou for purchasing [product] on [date]. > > We're sure you'll be very [expectation]. > > Ta Very much." > > Whats the easiest way to replace all the things in square brackets with

RE: [PHP] find and replace in php

2002-07-02 Thread Lazor, Ed
Body = ""; if (empty($firstname)) $MailBody .= "Dear Customer"; else $MailBody .= "Dear $firstname"; Note the use of .= to append to the string. -Original Message- From: Henry [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 10:53 AM To: [EMAIL

[PHP] find and replace in php

2002-07-02 Thread Henry
Imagine I have a piece of text "Dear [firstname] Thankyou for purchasing [product] on [date]. We're sure you'll be very [expectation]. Ta Very much." Whats the easiest way to replace all the things in square brackets with variables of the same name. i.e. $firstname, $product, $date, $expecta