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.

One Response to PHP str_repeat() string function

  1. bandarQ says:

    Awesome post.

Leave a Reply

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

Captcha *