Str_repeat Function in PHP

This function is used to repeat a string fixed no of times.

It accepts two parameters :

a) a string to be repeated

b) no of times it is to be repeated


<?php

//string to be repeated

$a="devlup";

//result

$r=str_repeat($a,20);

echo $a;

?>

No Responses to “Str_repeat Function in PHP”

Leave a Reply

*