it's actually not too difficult to get to CSV from this point - but do you want CSVs, or do you want to insert it into a DB? Don't put CSVs into a database.
<?php
$json_string = '{"page_number":"1","total_rows":"2","date":"April, 19 2012 00:44:42","stats":[{"rnk":"1","top":"4","ref":"1000007","3Per":"1.0","sts":"4","w":"2","p":"2","sF":"00112","es":"8.0020","reg":"X","hN":"Defence","s":"0","winP":"0.98"},{"rnk":"3","top":"2","ref":"1000001","3Per":"1.0","sts":"4","w":"2","p":"2","sF":"00112","es":"8.0020","reg":"X","hN":"Defence","s":"0","winP":"0.98"},{"rnk":"2","top":"4","ref":"1000000","3Per":"1.0","sts":"4","w":"2","p":"2","sF":"00111","es":"7.0002","reg":"X","hN":"Forward","s":"9","winP":"0.12"}]}';
// parse into assoc.array
$json_array = json_decode( $json_string,TRUE );
// loop through "stats"
foreach( $json_array['stats'] as $stats ){
// turn each array into a CSV list
$csv[] = implode( ',',$stats );
}
// print all the CSVs (to see the result)
print nl2br( implode( "\n",$csv ) );
/* outputs something like:
1,4,1000007,1.0,4,2,2,00112,8.0020,X,Defence,0,0.98
3,2,1000001,1.0,4,2,2,00112,8.0020,X,Defence,0,0.98
2,4,1000000,1.0,4,2,2,00111,7.0002,X,Forward,9,0.12
*/