ninja_forms_subval_sort

The Ninja Forms ninja forms subval sort function.

Description

ninja_forms_subval_sort( $a, $subkey ); 

Parameters (2)

0. $a
The a.
1. $subkey
The subkey.

Usage

  1. if ( !function_exists( 'ninja_forms_subval_sort' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/functions.php'; 
  3.  
  4. // The a. 
  5. $a = null; 
  6.  
  7. // The subkey. 
  8. $subkey = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ninja_forms_subval_sort($a, $subkey); 
  12.  

Defined (1)

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

/deprecated/includes/functions.php  
  1. function ninja_forms_subval_sort( $a, $subkey ) { 
  2. $b = ''; 
  3. foreach($a as $k=>$v) { 
  4. $b[$k] = strtolower($v[$subkey]); 
  5. if ( is_array ( $b ) ) { 
  6. asort($b); 
  7. foreach($b as $key=>$val) { 
  8. $c[] = $a[$key]; 
  9. return $c; 
  10. } else { 
  11. return $a; 
  12.