Perhaps I was not that clear on the subject :)

I have the following array:

$SAVEVARS[headerimage]=$_POST[headerimage];
$SAVEVARS[backgroundimage]=$_POST[backgroundimage];

I want to iterate through it to save to a database config:

Forach($SAVEVARS as $whatever) {
    $query="update table set $whatever=$whatever[$whatever]";
}

Where the 'set $whatever' would become 'set headerimage' and
'=$whatever[$whatever]' would become the value that was posted through and
set on the line above.

The question is the - the assigned string key - is there a way to retrieve
that in a loop?  Foreach, for, while or otherwise?

--
Cheers

Mike Morton

****************************************************
*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*
****************************************************

"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to