Description Edit

str_repeat returns a given string a given number of times.

Note: The multiplier must be greater than or equal to 0! If multiplier was set to 0 str_repeat will return an empty string.

Parameters Edit

{{{returns}}} str repeat (string input, int multiplier)

Parameter Infos Edit

Parameter PHP Version Type
str_repeat 4 or 5 returns string
input 4 or 5 string
multiplier 4 or 5 integer

Examples Edit

Example 1: Edit

 echo str_repeat("AB", 10);

Output Edit


See also Edit

for, str_pad, substr_count

For more details on this function, visit its entry in the php manual.