开发者

Split string based on a series of characters

I want to know how i can split a string in php based on a series of characters. Like for example, i have a string as: a^b^^c^^^d^^^开发者_高级运维^e

Now how i can break this string into an array as: a,b,c,d,e ? The php explode function does not seem to work here....

Please help..


You can use the preg_split function:

$array = preg_split("/\^+/", $str);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜