Date: 08/31/00
- Next message: James Moore: "RE: [PHP-DEV] MySql connect to remote server with PHP?"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #6468 Updated: installation java.dll"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: drew <email protected>
Operating system: RH 6.2 i386
PHP version: 4.0.2
PHP Bug Type: Other
Bug description: Variable variables with arrays
Is there any reason why this does not work :-
<?
$array = array("key" => "value");
$key = "[key]";
$variable_variable = "array${key}";
$value = $$variable_variable;
print $value;
?>
The only way around this seems to be eval. Not good.
Rgds Drew Wells
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: James Moore: "RE: [PHP-DEV] MySql connect to remote server with PHP?"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #6468 Updated: installation java.dll"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

