I know something is wrong with the array. How can I fix it so it inserts the rows?
$cols=(col1,col2,col3,col4,col5,col6,col7,col8,col9);
$cnx = odbc_connect("Driver={Microsoft ODBC for Oracle}; SERVER="myserver", "fsread","fsread");
$rs = odbc_exec($cnx,$sql1);
$Fields=odbc_num_fields($rs);
$cnt=0;
while( odbc_fetch_row( $rs )){
$cnt++;
for($i=1; $i<=$Fields;$i++){
$str=odbc_result($rs,$i);
$arr= array();
array_push($arr,$str);
}
$sData = "'".implode("','", $arr)."'" ;
$sql3= "INSERT INTO `mydb`.mytable($cols)" ;
$sql3.="VALUES($sData) ";
$result=mysql_query($sql3);
$strdata='';
$sData='';
}//end while
odbc_close( $cnx);
}