|
Collator::asortcollator_asortSort array maintaining index association DescriptionObject-oriented style
public bool Collator::asort(array
&$array , int $flags = Collator::SORT_REGULAR)Procedural style bool collator_asort(Collator
$object , array &$array , int $flags = Collator::SORT_REGULAR)This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. Array elements will have sort order according to current locale rules. Equivalent to standard PHP asort. Parameters
Return Values
Returns Examples
Example #1 collator_asort example
The above example will output: array ( 'c' => '7', 'b' => '50', 'a' => '100', )array ( 'a' => '100', 'b' => '50', 'c' => '7', ) |