tags:

views:

36

answers:

1

hello.. is there any other way to print 40 dots in php?

i have this in my mind but i think this is wrong.. maybe there was a way like this.

<?php print(".",40);  ?>

is it possible to do in that way? without the use of looping..?

+10  A: 

Yes ! use the str_repeat function:

echo str_repeat('.', 40);
Mike Johnson
+1 Here's a link to the PHP reference docs for [str_repeat](http://www.php.net/str_repeat).
wimvds