summaryrefslogblamecommitdiffstats
path: root/bio/vaje/1/programi/koliko.php
blob: 6ec7933ce96c5607403be9b2078bdac0496a1376 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                 
#!/usr/bin/env php
<?php
	$d = file_get_contents("../urejeni.csv");
	$e = explode("\n", $d);
	$v = array();
	foreach ($e as $f) {
		$g = explode(",", $f);
		$v[$g[$argv[1]]]++;
	}
	ksort($v);
	foreach ($v as $k => $s) {
		$p .= "$k,$s\n";
	}
	file_put_contents($argv[2], $p);
	var_dump($v);
?>