Sunday, 13 January 2013

How to repeat a string n times in PHP?

Question
How to repeat a string n times in PHP?

Answer


echo str_repeat(" www.phpblog.in ", 3);
?>


Explanation

This function will repeat a particular string 3times and display on the screen

No comments:

Post a Comment