Forum Moderators: coopster
$lib_dir=$data['lib_dir'];// the query and above script works fine (verified)
}
$cfg['ilibs_dir']=array(
$lib_dir_2['value']=('$lib_dir'), // Cannot get $lib_dir value , although as a stand alone out of the array it echoes OK.
$lib_dir_2['text']=(' "My TEST" ')
);
while ( list($field, $value) = each ($lib_dir_2))
{
$$field=$value;
}
This is the correct version
$lib_dir = $data['lib_dir'];// the query and above script works fine (verified)
}$cfg['ilibs_dir'] = array(
($lib_dir_2['value'] = $lib_dir), // Cannot get $lib_dir value , although as a stand alone out of the array it echoes OK.
($lib_dir_2['text'] = 'My TEST')
);
while ( list($field, $value) = each ($lib_dir_2))
{
$$field = $value;
}
Hope this helps!
Michal Cibor
unfortunately I have for the rest of the script no other alternative than to pass it inside the array
($lib_dir_2['value'] = $lib_dir),
I can live with a stripped out version
without "While"
and simply trying to pass $lib_dir within an array
$cfg['ilib_dir']=array(
and then within the array $lib_dir)
so via the array
$cfg['ilib_dir'] will have $lib_dir value.
$lib_dir = 'lib_dir';
$cfg['ilibs_dir'] = array(
$lib_dir_2['value'] = ($lib_dir),
$lib_dir_2['text'] = (' "My TEST" ')
);
while ( list($field, $value) = each ($lib_dir_2)) {
$$field=$value;
}