PHP str_repeat() Function

The str_repeat() function repeats a string a specified number of times.

string str_repeat ( string $input , int $multiplier )

Returns input repeated multiplier times.

Example -

ParameterDescription
stringRequired. Specifies the string to repeat
repeatRequired. Specifies the number of times the string will be repeated. Must be greater or equal to 0

Returns the repeated string.