try<?php
$teststring = "2010-03-14,74527,645,New,7417417,Toll,2,74527417,32,202,7452741741,ghtgbwt,gtgwtgwtfgwtrg,2010-03-14,857527527,645,New,7417418,Toll,7,74527418,32,202,527527,hjm,djmdmdjmdjmdgjm,2010-03-14,85285,645,New,7417419,Toll,2,74527419,32,202,750757,jryjkryjkfryk,yjmyjyjtyjhm";
//$teststring1 = preg_replace("/([a-zA-Z0-9_\-]+?),/" , "\"$1\",",$teststring);
//$teststring2 = preg_replace("/\,{13}/" , "],[",$teststring1);
$a = array_chunk(explode(',',$teststring),13);
foreach ($a as $k => $b) $a[$k] = '"'.implode('","', $b).'"';
$teststring2 = implode('],[',$a);
var_dump($teststring2);
?>