将插入查询从sql文件转换为php数组

I have a sql file which is having lot of insert queries. is there any way to convert these insert queries to php arrays?

i dont want to insert these items directly to database. before inserting i want to filter lot of items from these

`INSERT INTO `products` (`p_id`, `p_name`, `p_parent`, `p_dependent`,`p_pid`) VALUES
(1, 'some', "some", '2', '1'),(1, 'some', "some", '2', '1'),(1, 'some', "some", '2', '1'),(1, 'some', "some", '2', '1')

is there any option in regex to convert these into array?

Take the whole query in a PHP string, then explode it for paranthesis and you will find (after the first return) your query values. From here, you can further explode them by commas to return each value of the query if you want to avoid some of them. After having your queries all good in a PHP array, just parse the array and execute insert statements with the values in your array.