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 <Br>";
        }
}

where the function prints this;

job_ID : 2
jobTitle : testtestt
jobDesc : esttest
jobShortDesc :
jobSalary :
jobLocation :
client_ID : 2
jobContractType : 1

I want to create global variables from the data ie $job_ID = 2, $jobTitle =
testtestt

but this is not working, the values are remaining empty.

Has anyone got any ideas on this.

Regards

Tom Hodder


--



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to