variable replacement in string
- From: "M. Strobel" <sorry_no_mail_here@xxxxxxxxxxx>
- Date: Thu, 10 May 2012 14:44:08 +0200
Hi,
I am still searching a function in PHP to execute variable replacement in strings.
Other languages do have this, but for PHP I can only find sprintf() and string replace.
I have
$t = ' - solved - ';
$msg = 'The problem is $t';
I want now:
echo fxx($msg);
print out "The problem is - solved - ".
Please don't tell me about $msg = "The problem is $t"; just think of $msg like a
template read from a file.
/Str.
.
- Follow-Ups:
- Re: variable replacement in string
- From: "Álvaro G. Vicario"
- Re: variable replacement in string
- From: Jeff North
- Re: variable replacement in string
- From: Jerry Stuckle
- Re: variable replacement in string
- From: Goran
- Re: variable replacement in string
- From: The Natural Philosopher
- Re: variable replacement in string
- Prev by Date: Re: Windows binaries 64bit for PHP
- Next by Date: Re: variable replacement in string
- Previous by thread: image and youtube links in array
- Next by thread: Re: variable replacement in string
- Index(es):
Relevant Pages
|