agesorter_compare

The Contact Form 7 - Infusionsoft Add-on agesorter compare function.

Description

agesorter_compare( $a, $b ); 

Parameters (2)

0. $a
The a.
1. $b
The b.

Usage

  1. if ( !function_exists( 'agesorter_compare' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7-infusionsoft-add-on/src/xmlrpc-3.0/demo/server/server.php'; 
  3.  
  4. // The a. 
  5. $a = null; 
  6.  
  7. // The b. 
  8. $b = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = agesorter_compare($a, $b); 
  12.  

Defined (1)

The function is defined in the following location(s).

/src/xmlrpc-3.0/demo/server/server.php  
  1. function agesorter_compare($a, $b) 
  2. global $agesorter_arr; 
  3.  
  4. // don't even ask me _why_ these come padded with 
  5. // hyphens, I couldn't tell you :p 
  6. $a=str_replace("-", "", $a); 
  7. $b=str_replace("-", "", $b); 
  8.  
  9. if ($agesorter_arr[$a]==$agesorter[$b]) 
  10. return 0; 
  11. return ($agesorter_arr[$a] > $agesorter_arr[$b]) ? -1 : 1;