I'm trying to put each number of a phone number into a separate variable with little luck.
For example, a person inputs their phone number.
$phone_number = 8005478965;
And I want to get
$number1 = 8;
$number2 = 0;
$number3 = 0;
$number4 = 5;
... etc.
I have tried using
$phone_number = chunk_split($phone_number, 1);
and then
$data = explode(" ",$phone_number);
but $data[0] gives me 8 0 0 5 4 7 8 9 6 5 instead of 8.
Any suggestions.