str_repeat

str_repeat是表示字元串重複指定的函式。

基本介紹

  • 中文名:字元串重複指定
  • 外文名:str_repeat()
  • string:必需
  • repeat:必需
定義和用法,語法,例子,

定義和用法

str_repeat() 函式把字元串重複指定的次數。

語法

str_repeat(string,repeat)
參數
描述
string
必需。規定要重複的字元串。
repeat
必需。規定字元串將被重複的次數。必須大於等於 0。

例子

<?php
echo str_repeat(".",13);
?>
輸出:
.............
PHP String 函式

相關詞條

熱門詞條

聯絡我們