RE: [PHP] Variable question

From: Date: Mon, 07 May 2001 19:58:14 +0000
Subject: RE: [PHP] Variable question
Groups: php.general 
Request: Send a blank email to php-general+get-51811@lists.php.net to get a copy of this message
I think you're misunderstanding my question. I'm pulling $user_data["username"] from a databse so the string my user name is $user_data["username"]" is exactly as the database hands it to me. I know how to simply concat information. -Justin -----Original Message----- From: "Jack Dempsey" <dempsejn@georgetown.edu> Sent: Monday, May 07, 2001 12:55 PM To: King, Justin; php-general@lists.php.net Subject: RE: [PHP] Variable question you can do it a couple ways... echo "my user name is " . $user_data["username"]; or echo "my username is ${user_data["username"]}"; -----Original Message----- From: King, Justin [mailto:KingJ@superior.k12.wi.us] Sent: Monday, May 07, 2001 3:49 PM To: php-general@lists.php.net 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

« previous php.general (#51811) next »