Re: Variable question
| From: | Gyozo Papp | Date: | Mon, 07 May 2001 19:58:44 +0000 |
| Subject: | Re: Variable question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51810@lists.php.net to get a copy of this message | ||
Try this one :
$user_data['username'] = 'Alphonse';
$str = "my user name is {$user_data['username']}";
Papp Gyozo
- pgerzson@freestart.hu
----- Original Message -----
From: "King, Justin" <KingJ@superior.k12.wi.us>
To: <php-general@lists.php.net>
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: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net