You are here

private static function PHPExcel_Calculation_LookupRef::_vlookupSort in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/LookupRef.php \PHPExcel_Calculation_LookupRef::_vlookupSort()

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/LookupRef.php, line 674

Class

PHPExcel_Calculation_LookupRef
PHPExcel_Calculation_LookupRef

Code

private static function _vlookupSort($a, $b) {
  $f = array_keys($a);
  $firstColumn = array_shift($f);
  if (strtolower($a[$firstColumn]) == strtolower($b[$firstColumn])) {
    return 0;
  }
  return strtolower($a[$firstColumn]) < strtolower($b[$firstColumn]) ? -1 : 1;
}