[eluser]Sven Delle[/eluser]
I'm trying to setup a routine for environment checking. In a config file I have something like:
Code:
$config['requirements'] = array(
'PHP_VERSION_ID' => '50306',
'mysqli_get_client_version()' => '50509'
);
I then load the config and send it to the view, and would like to use PHP variable variables like:
Code:
foreach($requirements)
{
if($$req_key < $req_value)
// which SHOULD in the first case convert to: if(PHP_VERSION_ID < '50306')
{
// Code here ...
}
else
{
// Code here ...
}
}
But I get:
Message: Undefined variable: PHP_VERSION_ID
PHP_VERSION_ID is a valid variable if I echo it directly.
What do I have to do to convert the string to a variable and have it execute properly?