Try this one :
$user_data['username'] = 'Alphonse';
$str = "my user name is {$user_data['username']}";
Papp Gyozo
- [EMAIL PROTECTED]
----- Original Message -----
From: "King, Justin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 7. 21:48
Subject: [PHP] Variable question
How can I evaluate a variable in a string? For example if I have a
string defined as "my user name is $user_data["username"]", how do I
echo that string and have php evaluate $user_data["username"].
Thanks in advance..
-Justin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]