code: public static function splitCsv($strString, $strDelimiter=',')
  	{
  		$arrValues = preg_split('/'.$strDelimiter.'(?=(?:[^"]*"[^"]*")*(?![^"]*"))/', $strString);
  
  		foreach ($arrValues as $k=>$v)
  		{
  			$arrValues[$k] = trim($v, ' "');
  		}
  
  		return $arrValues;
  	}
docs: Split a string of comma separated values
  
  @param string $strString    The string to split
  @param string $strDelimiter An optional delimiter
  
  @return array The string chunks