PHP Preg_Split() Function Operates Like Split(), Except That Regular Expressions Are Accepted As Input Parameters For Pattern. – String Function

Its syntax is: array preg_split (string pattern, string string [, int limit [, int flags]])If limit is specified, then only limit number of substrings are returned. <?
$user_info = "+J+++G+++++w";
$fields = preg_split("/\+{1,}/", $user_info);
while ($x < sizeof($fields)) :
   print $fields[$x]. "<br />";

Enjoyed this post? Share it!


Leave a comment

Your email address will not be published.