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
Nothing will be inserted if the variable is empty, so you could just use $firstname, $product, $date, etc. inside your "letter". The main problem is adding logic to your "letter" to respond appropriately based on the value of different variables. For example: $MailBody = ""; if (empty($firstnam