array_fill should help:
array array_fill ( int $start_index, int $num, mixed $value )
Fills an array with numerical values โโof the value parameter values, keys starting with the parameter start_index.
In your case, the code will look like this:
$arr = array_fill(0, 4, '1st');
source share