How can I split a ten character string into three parts by counting the characters?
I want to seperate the first three, second three, and last four into an array.
Like a telephone number.
How do I do that?
$num[] = substr($str, 0, 3); $num[] = substr($str, 3, 3); $num[] = substr($str, -4);