InterviewSolution
Saved Bookmarks
| 1. |
How to repeat a string to a specific number of times in php? |
|
Answer» In PHP, the str_repeat() function, which is INBUILT is used to REPEAT a string for a specific number of times. This str_repeat() function creates new strings by repeating the GIVEN string ‘n’ number of times as specified. Here is the syntax of the str_repeat() function: str_repeat(string, repeat) ExampleHere is an example demonstrating the same: BIQ BIQ |
|