Home > Backend Development > PHP Tutorial > 数组位置替换,哪位高手帮看看呗

数组位置替换,哪位高手帮看看呗

WBOY
Release: 2016-06-13 10:07:09
Original
918 people have browsed it

数组位置替换,谁帮看看呗。
$the="a她们是";
$arr=array("a我是","a你是","a它是","a他们是","A她们是","a它们是");


怎么根据$the放到第一个去(不区分大小写)要函数
结果

$arr=array("A她们是","a我是","a你是","a它是","a他们是","a它们是");


------解决方案--------------------
array_unshift($arr,$the);
------解决方案--------------------
array_unshift($arr,$the);
------解决方案--------------------
喬丹,兩個都給誤導,沒有看清楚他要的是什麼... 

看數組結果

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