<?php $first = []; for($i = 0; $i < 10; $i++) $first[$i] = 0; for ($i = 1; $i <= 1000; $i++) { $str = (string)$i; $first[$str[0]]++; } var_dump($first);
You have javascript disabled. You will not be able to edit any code.