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);
精彩评论