On Wed, 24 Jul 2002 16:49:38 -0400
Martin Clifford "Martin Clifford" <[EMAIL PROTECTED]> wrote:
> You're trying to use double quotes, in which the variable is
> evaluated and the stored value is shown, right? Try using single
> quotes. For example, with $name = "Martin".
> echo "My name is $name.";
> OUTPUT: My name is Martin.
> echo 'My name is $name.';
> OUTPUT: My name is $name.
> It's interpreted literally, so you could store it in your database
> as such. HTH
> Martin Clifford
Thank you, Martin, for your informative response. If I understand
correctly what you're saying, it would work to do (in psuedo code
and reduce to simplest form):
store_to_db(text = "My name is $name.")
The at runtime I could do:
$name = 'Raquel'
echo "My name is $name"
OUTPUT: My name is Raquel
Is that correct?
What I'm trying to do is to create a web page where users can create
their own page text, store it into a database along with certain
available variables or functions, then display that page.
As a rule, there is no surer way to the dislike of men than to
behave well where they have behaved badly.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php