explode() 字符串转换数组
生活随笔
收集整理的這篇文章主要介紹了
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.
)
轉載于:https://www.cnblogs.com/chinalorin/p/5828614.html
總結
以上是生活随笔為你收集整理的explode() 字符串转换数组的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: .Net Core 中的包、元包与框架(
- 下一篇: 【PHP】__autoload()魔术方