RE: [PHP-DB] Assign a variable with another variables value
| From: | Beau Lebens | Date: | Mon, 02 Dec 2002 02:32:20 +0000 |
| Subject: | RE: [PHP-DB] Assign a variable with another variables value | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-23753@lists.php.net to get a copy of this message | ||
// Example:
$foo = "BAR";
${'new' . $foo} = "some string";
// this should do it i think, in this case creating a var called "$newBAR"
HTH
Beau
// -----Original Message-----
// From: Martin Allan Jensen [mailto:bailey@sprit.dk]
// Sent: Monday, 2 December 2002 10:30 AM
// To: php-db@lists.php.net
// Subject: [PHP-DB] Assign a variable with another variables value
//
//
// Hi folks,
//
// I probably need a little help the next couble of days, but
// well here is the first question.
//
// How can i assign a variable with the value of another variable ??
//
// Example:
// $foo = "BAR";
//
// $newBAR = "some string";
//
// The BAR is supposed to be taken from the value of $foo.
//
// THANKS A LOT!!!
//
// Regards,
// Martin Allan Jensen
//