RE: [PHP-DB] Assign a variable with another variables value

2002-12-01 Thread Beau Lebens
// 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:[EMAIL PROTECTED]]
// Sent: Monday, 2 December 2002 10:30 AM
// To: [EMAIL PROTECTED]
// 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
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Assign a variable with another variables value

2002-12-01 Thread Leif K-Brooks
$foo = BAR;
$varname = new$foo;
$$varname = some string;

Martin Allan Jensen wrote:


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

 


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php