Home >Backend Development >PHP Tutorial > php掏出数组中部分字符并根据字符排序

php掏出数组中部分字符并根据字符排序

WBOY
WBOYOriginal
2016-06-13 12:30:45946browse

php取出数组中部分字符并根据字符排序
假设有一个数组$a = array("2013aaa","2011bb","2015c");
其实这个素组是我从数据库里面取出来的,格式都是最前面的四个字是4个数字。
我想根据2013.2011.2015来排序,想要结果为:
2011bb,2013aaa,2015c
不知道这个要怎么实现?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn