/ Published in: PHP
This snippet allows an array or multiple arrays to be re-sorted using multiple key fields.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$rows=$result->fetchAll(PDO::FETCH_ASSOC); $row2=$rows; foreach($rows as $r) { $rProp[]=$r['properties']; $rSpec[]=$r['specificity']; $rDecl[]=$r['declaration']; $rDecl1[]=$r['declaration']; } FunctionToWriteReport('CSS Rules by Specificty',$rows); FunctionToWriteReport('Rules by Declaration',$rows);
URL: http://coboldinosaur.com/pages/php-array-multisort.html