脚本宝典收集整理的这篇文章主要介绍了我们可以在PHP中的一行上做多个爆炸声明吗?,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
例如,要这样做:
foreach(explode(" ",$sms['sms_text']) as $no) foreach(explode("&",$sms['sms_text']) as $no) foreach(explode(",",$sms['sms_text']) as $no)
一体化爆炸像这样:
foreach(explode('','&',',$sms['sms_text']) as $no)
preg_split
.
$parts = preg_split( '/(\s|&|,)/','This and&this and,this' ); PRint_r( $parts );
结果如下:
Array ( [0] => This [1] => and [2] => this [3] => and [4] => this )
以上是脚本宝典为你收集整理的我们可以在PHP中的一行上做多个爆炸声明吗?全部内容,希望文章能够帮你解决我们可以在PHP中的一行上做多个爆炸声明吗?所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。