The str_repeat() string function in PHP will repeat a string x amount of times. This function takes two parameters or arguments. The first is the string to be repeated(input), and the second is the number of times that string is to be repeated(multiplier).
<?php
$string = "Hello ";
$x = 5;
$result = str_repeat($string, $x);
echo $result;
?>
Hello Hello Hello Hello Hello