implode,explode的使用,implodeexplode_PHP教程

WBOY
Release: 2016-07-12 08:59:42
Original
886 people have browsed it

implode,explode的使用,implodeexplode

implode把数组转成字符串的函数,在组合SQL语句时候使用特好使!

比如

$a = array('a','b','c');
$b = implode(',', $a);
echo $b;

返回的字符串就是  a,b,c

 

explode把字符串组成的数组

$pizza  = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1097381.htmlTechArticleimplode,explode的使用,implodeexplode implode把数组转成字符串的函数,在组合SQL语句时候使用特好使! 比如 $a = array('a','b','c'); $b = implode(',', $a...
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!