str_repeat
(PHP 4, PHP 5)
str_repeat — Repete uma string
Descrição
string str_repeat
( string $input
, int $multiplier
)
Retorna input_str repetida multiplier vezes. multiplier deve ser maior ou igual a 0. Se o parâmetro multiplier for 0, a função irá retornar uma string vazia.
Example#1 Exemplo str_repeat()
<?php
echo str_repeat("-=", 10);
?>
Isto irá mostrar "-=-=-=-=-=-=-=-=-=-=".
veja também for, str_pad() e substr_count().