Use str_repeat instead of a for loop