<?php $part = "+61-426 861 478 +61-426 861 479 "; preg_match_all('/\+(\d{2})-(\d{3}(?: \d{3}){2})\b/', $part, $matches, PREG_SET_ORDER, 0); if (count($matches)) { foreach ($matches as $mob) { $records['mobile'][] = $mob[1] . ' ' . $mob[2]; } } print_r($records);
You have javascript disabled. You will not be able to edit any code.