I'm using Laravel 4 to count my database entries and I need to split each number to a different string or an array.
$users = DB::table('users')->count();
The result is for example 349, and I need to get:
$string1 = 0;
$string2 = 0;
$string3 = 3;
$string4 = 4;
$string5 = 9;
or an array
$string[0] = 0;
$string[1] = 0;
$string[2] = 3;
....
I specifically need 5 numbers, even if the count(); result is 349 I need to add 0 and 0 before it, or if I get 1234 - one zero needs to be before it because I need 5 numbers.
What do I need to use to get wanted results?