Not a member? Signup now
Input: 20,21 $arr = preg_split ("/\,/", $keyword); foreach ($arr as $item) { console.log($item) } Output: 20 21