FANDOM



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

<?php
 echo str_repeat("AB", 10);
?>

Output Edit

ABABABABABABABABABAB


See also Edit

for, str_pad, substr_count

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.