Free PHP Tutorials

home
Stay at Home and Learn

str_repeat( )

 
Computer Tutorials List

 

 

 

 

 

Repeats a character a specified number of times. If you want nine dollar signs, for example, then you'd use the function like this:

 

$extra_dollars = str_repeat("$", 9);
print $extra_dollars;