Re: Variable substitution
| From: | Jason Wong | Date: | Sun, 21 Apr 2002 11:00:06 +0000 |
| Subject: | Re: Variable substitution | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93877@lists.php.net to get a copy of this message | ||
On Saturday 20 April 2002 17:08, Greg Hulands wrote:
> Hi,
> I am trying to make an e-mail form so that I can generate an e-mail to send
> to all the users of the system. In the message part I want to be able to do
> something like this.
>
> Dear $fName,
> Welcome to .....
>
> When it then sends the e-mail, it should substitute $fName with the current
> row in the database. For some reason it does not get automatically
> substituted when using mail(to, subject, message). Is there a function that
> substitutes variables with there values and returns a string.
Depending on your existing code, your options include eval(),
substr_replace(), str_replace().
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Make me look like LINDA RONSTADT again!!
*/