str_repeat

(PHP 4 >= 4.0b4)

str_repeat -- Repeat a string

Description

string str_repeat (string input, int multiplier)

Returns input_str repeated multiplier times. multiplier has to be greater than 0.

Example 1. str_repeat() example


echo str_repeat ("-=", 10);
     

This will output "-=-=-=-=-=-=-=-=-=-=".

Note: This function was added in PHP 4.0.