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

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

WBOY
Release: 2016-06-13 12:30:45
Original
942 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template