I have a function that reads a config file and then makes variables from the values in the file.
$arr is an array of values read from a text file and then this is turned into variables.
foreach ($arr as $k => $v) {
${$k} = trim($v);
}
This is all done within a function. However I'd like to use the variables created elsewhere in the page. As they are dynamically created I don't know what they will all be called.
Is there any way to do this ?
Thanks
asbetween in youforeachasis in my code, I missed it when I typed it in on here..