OK, I see.
a recordset is already an array. you dont need to convert it by using a loop.
change:
do {
$specificationsarray[$row_rsspecifications['ItemID']] = $row_rsspecifications;
} while ($row_rsspecifications = mysql_fetch_assoc($rsspecifications));
to:
$specificationsarray = $row_rsspecifications;