PHP str_repeat() 函數(shù)
PHP String 參考手冊(cè)
實(shí)例
把字符串 "." 重復(fù) 13 次:
<?php
echo str_repeat(".",13);
?>
運(yùn)行實(shí)例 ?
定義和用法
str_repeat() 函數(shù)把字符串重復(fù)指定的次數(shù)。
語(yǔ)法
str_repeat(string,repeat)
參數(shù) | 描述 |
string | 必需。規(guī)定要重復(fù)的字符串。 |
repeat | 必需。規(guī)定字符串將被重復(fù)的次數(shù)。必須大于等于 0。 |
技術(shù)細(xì)節(jié)
返回值: | 返回被重復(fù)的字符串。 |
PHP 版本: | 4+ |
PHP String 參考手冊(cè)