RE: [PHP] email templates and str_replace

2001-06-20 Thread Brian S. Dunworth
> Richard, > The problem is with the str_replace()s. Consider the following: > > $myvar = 'this is a var.'; > $mytext = str_replace('is', 'is not', $myvar); > ?> > > At this point $myvar still equals 'this is a var.' but $mytext is 'this is > not a var.' $myvar hasn't been modfified by

RE: [PHP] email templates and str_replace

2001-06-20 Thread Rich Cavanaugh
Richard, The problem is with the str_replace()s. Consider the following: At this point $myvar still equals 'this is a var.' but $mytext is 'this is not a var.' $myvar hasn't been modfified by the str_replace so any additional str_replace()s after it will not have a cumlative effect.

Re: [PHP] email templates and str_replace

2001-06-20 Thread Chris \"TunkeyMicket\" Watford
Mr. Kurth,       Try this.  Save the mail template to another file [like mailtemplate.txt] then open it for reading.   //read in template $template = file("mailtemplate.txt");   //setup variables $fullname="Richard Kurth";$email="[EMAIL PROTECTED]";$hostdomain="northwesthost.com";    $hostn

Re: [PHP] email templates and str_replace

2001-06-20 Thread Zak Greant
Hi Richard, You are replacing the placeholders in $mail_template, but you are storing the results in $mail_content. > $mail_content = str_replace('##fullname##',$fullname,$mail_template); > $mail_content = str_replace('##email##',$email,$mail_template); This means that each time you call the st