str_repeat()


string str_repeat ( string $input, int $multiplier )

Description

str_repeat() is used to repeat a string, a specified number of times

※ available F/W version : all

Parameters

Return values

Returns the repeated string

Example

<?php
$input = "PHPoC!";
$multiplier = 3;

$ret = str_repeat($input, $multiplier);

echo "result: $ret\r\n";  // OUTPUT: result: PHPoC!PHPoC!PHPoC!
?>

See also

str_replace() / strpos() / substr() / substr_replace()

Remarks

This function is identical to the PHP group’s str_repeat() function.