Splitting string into words in php -


i need split string array of words using non alphabetic , numeric characters(including '_') delimiter present code here

$result= wordarray(preg_split("#[&,$'_.;:\s-*]# ", $data));   

as can see can't work these characters

)(@#+-*/=!~`/ \

please me adding characters code.

thanks in advance.

you can use ^ not operator...

$result= preg_split("/[^a-za-z0-9]/", $data); 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -