Is there a nice way (without looping) to create a string constructed by a number of the same characters?
E.g. I know I should add 5 ‘.’ to the beginning of a string. How do I do that without looping?
I don’t know beforehand that it should be 5 ‘.’, that can vary. Hence my question.
I’m using PHP.
Try with
str_repeat: