diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-11-14 00:00:59 +0100 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-11-14 00:00:59 +0100 |
commit | ba067958e13d2bdb3fa95644771ee40ac13c4db2 (patch) | |
tree | e3cb1bd108d544c1f650e415fdfcad15a524ea0c /bio/vaje/1/programi/koliko.php | |
parent | nemščina delo 12. 11 (diff) | |
download | sola-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-x | bio/vaje/1/programi/koliko.php | 16 |
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); +?> |