Repeating Strings in PHP


Repeat a string a specified number of times with str_repeat().

Source Code

echo str_repeat("Hip ", 3) . "Hooray!"; // Outputs: Hip Hip Hip Hooray!
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments