Is it just me or is that a tad confusing?
As far as I have learned 'SET' is either for changing the server operation options or for use in UPDATE queries. If you are only inserting data into your database, lose the set part of the query...
$sql = "INSERT INTO `thebooks`
If you wanted to overwrite an old row, use UPDATE `thebooks` SET ...... WHERE a='b'
Any chance you could give a quick idea of the array setup that you are trying to insert?
You are possibly going to be wanting to eval the value of your inserted data from an array, just would be heaps easier to help if we knew where the data is coming from and in what format it is reaching the query
a quicky eg
$temp = array("TLOTR","hobbit.jpg","http:tolkien")
$temp = array("CITR","holden.jpg","http:salinger")
would be easy as you could just increment the $temp[index] and attribute known second dimension indices.
Last note: Your multidimensional syntax should be fine, as long as you have an index in $temp named test
$temp_index = -1;
while(++$temp_index < count($temp))
$quiz = "INSERT INTO `thebooks`
$temp = array( test => "7", retest => "12")