summaryrefslogtreecommitdiffstats
path: root/bio/vaje/1/programi/koliko.php
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-11-14 00:00:59 +0100
committersijanec <sijanecantonluka@gmail.com>2020-11-14 00:00:59 +0100
commitba067958e13d2bdb3fa95644771ee40ac13c4db2 (patch)
treee3cb1bd108d544c1f650e415fdfcad15a524ea0c /bio/vaje/1/programi/koliko.php
parentnemščina delo 12. 11 (diff)
downloadsola-gimb-2-ba067958e13d2bdb3fa95644771ee40ac13c4db2.tar
sola-gimb-2-ba067958e13d2bdb3fa95644771ee40ac13c4db2.tar.gz
sola-gimb-2-ba067958e13d2bdb3fa95644771ee40ac13c4db2.tar.bz2
sola-gimb-2-ba067958e13d2bdb3fa95644771ee40ac13c4db2.tar.lz
sola-gimb-2-ba067958e13d2bdb3fa95644771ee40ac13c4db2.tar.xz
sola-gimb-2-ba067958e13d2bdb3fa95644771ee40ac13c4db2.tar.zst
sola-gimb-2-ba067958e13d2bdb3fa95644771ee40ac13c4db2.zip
Diffstat (limited to 'bio/vaje/1/programi/koliko.php')
-rwxr-xr-xbio/vaje/1/programi/koliko.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/bio/vaje/1/programi/koliko.php b/bio/vaje/1/programi/koliko.php
new file mode 100755
index 0000000..6ec7933
--- /dev/null
+++ b/bio/vaje/1/programi/koliko.php
@@ -0,0 +1,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);
+?>