Home >Backend Development >PHP Tutorial >The use of implode,explode, implodeexplode_PHP tutorial

The use of implode,explode, implodeexplode_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 08:59:42928browse

implode,explode use, implodeexplode

implode is a function that converts an array into a string. It is very useful when combining SQL statements!

For example

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

The returned string is a,b,c

explode an array composed of strings

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1097381.htmlTechArticleUsage of implode and explode, implodeexplode implode is a function that converts an array into a string. Use special functions when combining SQL statements. Good job! For example $a = array('a','b','c'); $b = implode(',', $a...
Statement:
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