I need to insert multiple array. I get error: mysql_real_escape_string() expects parameter 1 to be string, array given
My example code:
$array_info is
Array
(
[0] => Array
(
[0] => a
[1] => b
[2] => c
)
[1] => Array
(
[0] => d
[1] => e
[2] => f
)
)
$data = array(
'blog_id' => NULL,
'post_id' => $id,
'ing' => $array_info
);
$insert = $wpdb->insert($table_name, $data);
$table_name
value?$wpdb->insert()
expects$data
to be an array of column => value pairs. Your$data
array doesn't meet that criterion.