This function is used to repeat printing a string a certain number of times.
Syntax: str_repeat(string,count);
string – the input string
count – the number of times the input string needs to be printed.
Example input:
echo str_repeat("*",10);
Example output:
**********
PS: This function could be used to create interesting patterns.
No comments:
Post a Comment