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`
(Bookname,Bookimage,Bookurl) VALUES
('$temp[0]','$temp[1]','$temp[2]')";
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[0] = array("TLOTR","hobbit.jpg","http:tolkien")
$temp[1] = array("CITR","holden.jpg","http:salinger")
would be easy as you could just increment the $temp[index] and attribute known second dimension indices.
PHP Code:
$temp_index = -1;
while(++$temp_index < count($temp))
{
$quiz = "INSERT INTO `thebooks`
(Bookname,Bookimage,Bookurl) VALUES
('$temp[$temp_index][0]','$temp[$temp_index][1]','$temp[$temp_index][2]')";
}
Last note: Your multidimensional syntax should be fine, as long as you have an index in $temp[0] named test
$temp[0] = array( test => "7", retest => "12")