explode() 字符串转换数组
explode() 函数把字符串分割为数组。
语法
explode(separator,string,limit)
例子:
$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.
)
帅的无语!