一个对“web前端”和“互联网创业”有着浓厚兴趣的90后草根站长!
在php中如何对字符串进行排序
php
字符串按照ASCII码顺序排序
ASCII码
假设字符串为hellotheworld123
hellotheworld123
$str = 'hellotheworld123'; $arr = str_split($str); asort($arr); $str = implode('',$arr); echo $str;
结果为123deehhllloortw
123deehhllloortw
如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术
转载请注明:php字符串排序 出自老鄢博客 | 欢迎分享
表情