Re: [PHP-DB] Echoing a variable within a variable.

2009-01-06 Thread Phpster
A couple of options: 1. Use eval($databaseString); there are risks as it could be used to execute arbitrary code should the database be compromised. 2. If your data string is enclosed in single quote php won't evaluate the variables. Consider changing the outside quotes to double quotes.

Re: [PHP-DB] Echoing a variable within a variable.

2009-01-06 Thread Micah Gersten
If you use preg_replace with the e modifier, you can run eval on the variables only: http://us.php.net/preg_replace Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Phpster wrote: A couple of options: 1. Use eval($databaseString); there are risks as it