Dear friends, I have a string like bellow: $string = "ABCDE 56.10 0.80 1.45%"; PHP: I would like to remove all spaces and split and put on a arry something like bellow: $string[0] ; // output ABCDE $string[1] ; // output 56.10 $string[2] ; // output 0.80 $string[3] ; // output 1.45% Please help me. Thanks
Dear friends, i solved the problem myself here is the code: $string = preg_split("/[\s,]+/", $code); print_r($string); // or echo "$string[0] $string[1] $string[2] $string[3]"; PHP: