Definition
The str_repeat() function repeats a string a specified number of times.
Syntax
str_repeat(string, repeat)
Parameters
Parameter | Description |
---|---|
string |
Required. Specifies the string to repeat. |
repeat |
Required. Specifies the number of times the string will be repeated. Must be greater or equal to 0. |
Example
<?php
echo str_repeat("Hello<br>", 3);