So I wrote a class that can parse XML documents and create SQL queries from it to update or insert new rows depending on the settings.
Because the script has to work wit
You can use a foreach with variable variables.
// assuming a base called $array, and the path as in your example: $path = array('field1','field2'); $$path = $array; foreach ($path as $v) $$path = $$path[$v]; $$path['value'] = 'test';
Short, simple, and much better than eval.