X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP str_repeat() Function

PHP String Reference PHP String Reference

Example

Repeat the string "." 13 times:

<?php
echo str_repeat(".",13);
?>

Run example »

Definition and Usage

The str_repeat() function repeats a string a specified number of times.


Syntax

str_repeat(string,repeat)

Parameter Description
string Required. Specifies the string to repeat
repeat Required. Specifies the number of times the string will be repeated. Must be greater or equal to 0

Technical Details

Return Value: Returns the repeated string
PHP Version: 4+


PHP String Reference PHP String Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook