时间:2021-07-01 10:21:17 帮助过:3人阅读
PHP函数explode()例子
- php
- $str = "Hello world. It's a beautiful day.";
- print_r (explode(" ",$str));
- ?>
输出:
- Array
- (
- [0] => Hello
- [1] => world.
- [2] => It's
- [3] => a
- [4] => beautiful
- [5] => day.
- )
以上代码示例就是PHP函数explode()的具体使用。
http://www.bkjia.com/PHPjc/446303.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446303.htmlTechArticle目前 PHP函数explode()把字符串分割为数组 explode(separator,string,limit) separator 必需。规定在哪里分割字符串。 string 必需。要分割的字符串。 l...