> ksort() in php ~ Online tutorial

ksort() in php

ksort() function sorts an array by the keys.The values keep their original keys

syntax
ksort(array,sorttype)


<?php

$sum=array(a=>"india",b=>"pak");
ksort($sum);
print_r($sum);

?>

Output
Array(a=>india
b=>pak)

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: