PHP Manual
Prev |  | Next

# str_repeat

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
      1
      2 echo str_repeat ("-=", 10);
      3

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

> Note: This function was added in PHP 4.0.

Prev | Home | Next
strrchr | Up | strrev