数组中过滤的有关问题

WBOY
Release: 2016-06-13 13:34:58
Original
809 people have browsed it

数组中过滤的问题

array('中国','人民',大中国');

因为‘中国’存在于‘大中国’中,我想让它去掉只留下
array('人民',大中国'); 

如何做,有没有什么函数?

------解决方案--------------------
用array_shift()函数

PHP code
$arr = array("hello","world","yes");
array_shift($arr);
print_r($arr);

------解决方案--------------------
substr(0,6,array('中国','人民',大中国');
就可以了
Copy after login
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!