PHP str_repeat() string function

The str_repeat() function in PHP

The str_repeat() function used to repeat a word for specified number of times.

str_repeat() function syntax

str_repeat(“repeat string”, number of time”);

PHP str_repeat() function example

The output is:

The string repeat = MeeraMeeraMeeraMeera


PHP str_repeat string function example

The output screen of php string function example :

PHP str_repeat string function

PHP str_repeat string function

In above str_repeat function php example we have two textboxes first for input text value and other for integer value to repeat how many times repeated the text.

Leave a Reply

Your email address will not be published. Required fields are marked *

4 + 1 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">