[nycphp-talk] Quick little question - variable interpolation
Adam Fields
fields at surgam.net
Thu Oct 17 15:16:15 EDT 2002
On Thu, Oct 17, 2002 at 02:50:55PM -0400, Adam Fields wrote:
> This is one of those really easy questions that's difficult to search
> for because the search terms look like everything else.
>
> Is there an easy way to do simple variable interpolation on a string?
>
> For example, if I have:
>
> $one = '1';
> $two = '= $one';
>
> Is there a way to get $two to equal '= 1' (or whatever $one happens to
> contain, obviously)?
To clarify, I don't want $two to equal $one. I want $two to equal some
string that has a bunch of other characters and the value of $one. So
if the original $two string was:
'this string = $one and that is it'
I want it to be:
'this string = 1 and that is it'
after processing.
--
- Adam
-----
Adam Fields, Managing Partner, fields at surgam.net
Surgam, Inc. is a technology consulting firm with strong background in
delivering scalable and robust enterprise web and IT applications.
http://www.adamfields.com
More information about the talk
mailing list