Use the $GLOBALS array.
On Thu, 16 Aug 2001, Tom Hodder wrote:
>
> I have a function like this...
>
> function register_db_to_globals( $row )
> {
> while( list( $key, $val) = each( $row ) )
> {
> global $$key; // (I've tried this with $key as well
>
I have a function like this...
function register_db_to_globals( $row )
{
while( list( $key, $val) = each( $row ) )
{
global $$key; // (I've tried this with $key as well
print "$key : $val ";
}
}
where the function prints this;
j
2 matches
Mail list logo