[thelist] [php] globals q.
kris burford
kris at midtempo.net
Wed Sep 17 14:14:35 CDT 2003
hi all,
i've an old php script that i'm updating and, because i'm now working with
globals turned off, i'm struggling to make it work.
could someone please point me in the right direction?
$index = array("file", "name", "size", "type");
for($i = 0; $i < 4; $i++) {
$file_var = '$' . $filename . (($index[$i] != "file") ? "_" .
$index[$i] : "");
// this is what's causing me problems...
eval('global ' . $file_var . ';');
eval('$this->file[$index[$i]] = ' . $file_var . ';');
}
tia
kris
More information about the thelist
mailing list