Home >php教程 >php手册 >PHP技巧

PHP技巧

WBOY
WBOYOriginal
2016-06-21 09:06:23747browse

技巧

1、字符串处理


$colon_separated 
implode(","$array);  //用逗号将array数组组合成字符串,注意sql后的结果不能使用此方法
?>


$pizza 
"1,2,3,4,5";
$pieces explode(","$pizza);   //将pizza字符串依据逗号切开,返回值为数组.
?> 



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
Previous article:获取和安装 FleaPHPNext article:php页面刷新