You are here

public static function FrxReportFile::reportCompare in Forena Reports 7.4

Sort compare function for sorting data by category then title.

Parameters

unknown $a:

unknown $b:

Return value

number

File

./FrxReportFile.inc, line 67

Class

FrxReportFile

Code

public static function reportCompare($a, $b) {
  $c = strnatcasecmp($a->cache['category'], $b->cache['category']);
  if (!$c) {
    $c = strnatcasecmp($a->cache['title'], $b->cache['title']);
  }
  return $c;
}