<?php $list = '1,2,3,4'; preg_match_all('/^\d+|\G(?!^)(,?\d+)\K/', $list, $matches); print_r(array_map('array_filter', $matches));
You have javascript disabled. You will not be able to edit any code.