The array_fill() function is used to fill an array with values. The function fills an array with num entries of the value of the array_values parameter, keys starting at the starting_index parameter.