psTableSort() Table sort
Description:
This function sorts a table
Usage:
Example:
Code:
function psTableSort($table,$f) { $res = array(); $ndx = array(); // build list of items foreach ($table as $key=>$line) { $ndx[$key] = strip_tags($line[$f]); }
asort($ndx); foreach($ndx as $key=>$val) { $res[$key] = $table[$key]; }
return $res; }
Changlelog:
|
|