|
Collator::asortcollator_asortSort array maintaining index association BeschreibungObjektorientierter Stil
public
bool
Collator::asort
( array
&$arr
[, int $sort_flag
] )Prozeduraler Stil
bool
collator_asort
( Collator
$coll
, array &$arr
[, int $sort_flag
] )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. Parameter-Liste
Rückgabewerte
Gibt bei Erfolg Beispiele
Beispiel #1 collator_asortexample
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe: array ( 'c' => '7', 'b' => '50', 'a' => '100', )array ( 'a' => '100', 'b' => '50', 'c' => '7', ) |