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.

(Visited 1 times, 1 visits today)

One thought to “PHP str_repeat() string function”

Leave a Reply

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

Captcha *