What is the output of the PHP statement echo str_repeat(“ab”, 3);?
Correct answer D. ababab
Explanation
str_repeat() returns the input string repeated the given number of times, so "ab" repeated three times becomes "ababab" with no spaces added.
Answer checked How we write and check questions
Discussion