String: 23456,16524,84755,98457,06978,05986,73454,34785
23456
16524
84755
98457
06978
05986
73454
34785
Simply explode() can be used to break down the string by the delimiter of comma.
$string = '23456,16524,84755,98457,06978,05986,73454,34785'; $output = explode(',', $string); echo '<pre>', print_r($output);
Working demo.