1: 2:
$query_data = str_replace("''", "NULL", $query_data); $query_data.= str_repeat(', NULL', count(explode(',',$query_cols))-count($csvdata))