PHP ksort() ফাংশন
উদাহরণ
ক্রমবর্ধমান ক্রমানুসারে এককালীন অসমতুল্য সমগ্র এক্সেকিউট সার্ট করুন:
<?php $age=array("Bill"=>"60","Steve"=>"56","mark"=>"31"); ksort($age); ?>
পরিভাষা ও ব্যবহার
ksort() ফাংশন এককালীন অসমতুল্য সমগ্র এক্সেকিউট বাবদ ক্রমবর্ধমান ক্রমানুসারে সার্ট করে।
Hint:Please use krsort() The function sorts the associated array in descending order by key name.
Hint:Please use asort() The function sorts the associated array in ascending order by key value.
Syntax
ksort(array,sortingtype);
Parameters | Description |
---|---|
array | Required. Specifies the array to be sorted. |
sortingtype |
Optional. Specifies how to arrange the elements/items of the array. Possible values:
|
Description
The ksort() function sorts an array by key name, retaining the original keys of the array values.
Optional second parameter contains additional sorting flags.
Returns TRUE if successful, otherwise returns FALSE.
Technical Details
Return Value: | Returns TRUE if successful, returns FALSE if failed. |
PHP Version: | 4+ |