Reputation: 3611
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?
Upvotes: 0
Views: 239
Reputation: 87
If you don't want to use any loop then the PHP function str_repeat()
will work correctly here. Another approach is to do this by the use of arrays.
Upvotes: 0