str_repeat()
Concatenate repetitions of a string to compose a new string.
Syntax
Parameter
Parameter | Definition |
|---|---|
string | string to be repeatedly concatenated to compose new string |
number | number of repetitions of string |
separator | separator string to insert between repetitions |
Description
This function will concatenate a specified string to itself with an optional separator for a specified number of times.
This function returns a string containing the specified number of concatenations of the specified string with separator string between repetitions.
This function does not set the PSL errno variable.
Example
The following is an example of the strcasecmp() function:
str="TEST";
test_list = str_repeat(str, 15, ", ");
print ("Test list: " . test_list . "\n");