|
|
Tutorials » Php »
|
Topic |
What is str_repeat Function?
|
|
Explanation |
|
This function is used to repeat a string in PHP.
Syntax:
str_repeat(string,multiplier)
The syntax specifies the string to be repeated for number of times as given in multiplier
Example:
<?php
echo str_repeat("Hscripts",4);
?>
Result:
Hscripts Hscripts Hscripts Hscripts
In the above example the string "Hscripts" is repeated four times
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|