Home > Backend Development > PHP Tutorial > PHP经常用到的数组操作小函数

PHP经常用到的数组操作小函数

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-19 12:16:01
Original
1184 people have browsed it
$str = '数组1,数组2,数组3,数组4';
$array = explode(',',$str); //将规律字符串存入数组
$array = array_diff($array,array('数组2')); //删除指定值的数组项
$str = implode(',',$array); //将数组存为规律字符串
echo $str;
Copy after login
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