- var_dump: documentation ( source)
- asort: documentation ( source)
<?php
$arr = [
'k1' => 0,
'k2' => 1,
'k3' => 0,
'k4' => 0,
'k5' => 3,
'k6' => 0,
'k7' => 4,
'k8' => 0,
'k9' => 0,
'k10' => 0,
'k11' => 0,
'k12' => 0,
'k13' => 0,
'k14' => 0,
'k15' => 0,
'k16' => 0,
'k17' => 0,
];
asort($arr);
var_dump($arr);