Alternativamente, se non hai bisogno di fare explode(), potresti provarlo anche così
Codice PHP:
preg_replace("/(^|,)\\s*\\d+/"""$str);