Hi,
I am trying to see if this is possible. I have thought about it and
cant see an easy way to do this.
OK say I have a script
<?php
//these variables get set in the script
$fname='Moe';
$bday='1970';
//extract a field from mysql
//select someField from someTable limit 1;
//the variable someField contains this value
//$someField='Wel come back $fname ! wow you must be an old fart since
you were born in $bday'
As you can see the variable is stored in the mysql table with embedded
variables in the string itself. What I would like to do is have these
variables evaluated somehow so that the $someField value contains this
value
Welcome back Moe ! wow you must be an old fart since you were born in
1970
?>
I am trying to see if this is possible. I have thought about it and
cant see an easy way to do this.
OK say I have a script
<?php
//these variables get set in the script
$fname='Moe';
$bday='1970';
//extract a field from mysql
//select someField from someTable limit 1;
//the variable someField contains this value
//$someField='Wel come back $fname ! wow you must be an old fart since
you were born in $bday'
As you can see the variable is stored in the mysql table with embedded
variables in the string itself. What I would like to do is have these
variables evaluated somehow so that the $someField value contains this
value
Welcome back Moe ! wow you must be an old fart since you were born in
1970
?>
Comment