Skip to content

Instantly share code, notes, and snippets.

@JingwenTian
Created November 23, 2013 15:39
Show Gist options
  • Save JingwenTian/7615903 to your computer and use it in GitHub Desktop.
Save JingwenTian/7615903 to your computer and use it in GitHub Desktop.
<?php
ini_set("memory_limit","500M");
date_default_timezone_set('Asia/Shanghai');
ini_set('max_execution_time',300000);
echo "<pre />";
$array=array();
$data=array();
$file=fopen('2013-11-19.csv','r');
while($re=fgets($file)){
$arr=explode(",",$re);
$array[$arr[1]][]=$arr[0];
}
foreach($array as $key=>$val){
if(count($val)>=5){
$data[$key]=$val;
}
}
echo count($data)."<br />";
print_r($data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment