PHP str_repeat() 函數
定義和用法
str_repeat() 函數把字符串重復指定的次數。
語法
str_repeat(string,repeat)
參數 | 描述 |
---|---|
string | 必需。規定要重復的字符串。 |
repeat | 必需。規定字符串將被重復的次數。必須大于等于 0。 |
技術細節
返回值: | 返回被重復的字符串。 |
PHP 版本: | 4+ |
str_repeat() 函數把字符串重復指定的次數。
str_repeat(string,repeat)
參數 | 描述 |
---|---|
string | 必需。規定要重復的字符串。 |
repeat | 必需。規定字符串將被重復的次數。必須大于等于 0。 |
返回值: | 返回被重復的字符串。 |
PHP 版本: | 4+ |