Hello,
I am trying to get values assigned to variables, by taking these data from a
textfile.
my txt file looks like that:
variable1 // value1
variable2 // value2
etc...
The point here is that I want to be able to get BOTH the variable name and
its corresponding value..
I tried things like:
From what I could see you want variable variables
$value = $line[0];
$variable = $line[1];
$$variable = $value;
// Tobias
Alain [EMAIL PROTECTED] wrote in message
9dqrh1$23a$[EMAIL PROTECTED]">news:9dqrh1$23a$[EMAIL PROTECTED]...
Hello,
I am trying to get values assigned to variables, by
So now my code looks like:
---
$configuration_data = file(configuration.txt);
for($index=0; $index count($configuration_data); $index++)
{
$line = explode( // ,$configuration_data[$index]);
$value = $line[0];
$variable = $line[1];
$$variable = $value;
echo
3 matches
Mail list logo