/ Published in: PHP
Orders a multi-dimensional field (such as sorting multiple $orders by field 'id')
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function orderBy($data, $field) { $code = "return strnatcmp(\$a['$field'], \$b['$field']);"; return $data; }