You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
418 B
23 lines
418 B
<?php |
|
|
|
namespace App\Libraries; |
|
|
|
class KpdlLibrary |
|
{ |
|
//private $fixedKey = session('nip'); |
|
|
|
public function single_array($a, $key) |
|
{ |
|
$ret = []; |
|
foreach ($a as $b) { |
|
array_push($ret, floatval($b->$key)); |
|
} |
|
for ($i = 0; $i < 12; $i++) { |
|
if (!isset($ret[$i])) { |
|
array_push($ret, 0); |
|
} |
|
} |
|
return $ret; |
|
} |
|
|
|
}
|
|
|