MySQL :insert data from array does't have integer
===

i have use function for inserting data to my sql.
the data is


    function mysql_insert($table, $arr){
	if($arr!=''){
		$values = array_map('mysql_real_escape_string', array_values($arr));
		$keys = array_keys($arr);
        $q=('INSERT INTO `'.$table.'` (`'.implode('`,`', $keys).'`) VALUES (\''.implode('\',\'', $values).'\')');
   		//$res = mysql_query($q)OR die(mysql_error());
   		return $q;
	}else{
		return false;
	}
data and query is came from :

    if($crud=='insert'){
	$field= array(	'col1' => 'apel',
			'c0l2' => 'box1',
			'col3' => 200,//integer Quantity
		);
	$data=mysql_insert('wh',$field);}echo json_encode($data);

and result is
= "INSERT INTO `wh` (`col1`,`c0l2`,`col3`) VALUES ('apel','box1','200')"
that col3 have value as string. i need that col3 as integer.
what wrong with this code?




