Use something like '<p>Hello, <b>xx_NAME_xx</b>, your password is:
xx_PASSWORD_xx'

When you want to output to an email, etc. use str_replace(), eg:

$search = array('xx_NAME_xx', 'xx_PASSWORD_xx');
$replace = array($destinatary[Person][name], $password);
$msg = str_replace($search, $replace, $the_string_from_db);

On Tue, Sep 15, 2009 at 9:09 AM, djogo <[email protected]> wrote:
>
> All messages, emails, and receipts that my system sends are stored in
> a database table. This way, system administrators are able to
> customize these messages without having to interact with programmers.
>
> Therefore, I need generic placeholders. I could write a hundred substr
> (), for each message type needs different variables (lost password
> email needs user info, project submission receipt needs project data,
> and there you go)
>
> That's why I wanted to perform var subst in a variable contents.I
> don't need code evaluation (bad practice, as pointed outra).
>
> Dfcp
>
> On Sep 14, 9:49 pm, "euromark (munich)" <[email protected]>
> wrote:
>> thats what bbcode, placeholders etc. and sprintf(), replace functions
>> etc. are for
>>
>> On 14 Sep., 20:11, brian <[email protected]> wrote:
>>
>> > On Mon, Sep 14, 2009 at 8:06 AM, djogo <[email protected]> wrote:
>>
>> > > That's exactly the point, I want it to be in a database column, and
>> > > allow the end-user to edit it. Therefore, $test would keep a HTML/RTF
>> > > document with tags <?=?>.
>>
>> > > I want to get it, perform variable substitution, and then e-mail it,
>> > > or save it in another database column, but I just don't want to
>> > > display it.
>>
>> > What do you mean by "allow the end-user to edit it"? What, exactly,
>> > are you trying to do? There's surely a better way, whatever it is.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to