<?php $string = '919191911'; $pattern = '(\\d)(?=(\\d{3})+$)'; $replacement = '$1$4 $2$3$5'; echo preg_replace($pattern, $replacement, $string);
You have javascript disabled. You will not be able to edit any code.