Go to the source code of this file.
Function Documentation
| rsort_by_field |
( |
& |
$Array, |
|
|
|
$Field |
|
) |
| |
Function sorts array.
- Parameters
-
| $Array | - Array of entities. |
| $Field | - Field name. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 71 of file array_functions.php.
{
usort(
$Array ,
create_function(
'$a , $b' ,
'return( get_field( $a , "'.$Field.'" ) > get_field( $b , "'.$Field.'" ) );'
)
);
}
| sort_by_field |
( |
& |
$Array, |
|
|
|
$Field |
|
) |
| |
Function sorts array.
- Parameters
-
| $Array | - Array of entities. |
| $Field | - Field name. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 38 of file array_functions.php.
{
usort(
$Array ,
create_function(
'$a , $b' ,
'return( get_field( $a , "'.$Field.'" ) < get_field( $b , "'.$Field.'" ) );'
)
);
}