【函数分享】每日PHP函数分享(2021-1-13)

str_repeat() 重复一个字符串 。 

string str_repeat ( string $input , int $multiplier )

 

参数描述

 

input

    待操作的字符串。 

 

multiplier    input 被重复的次数。 

 

返回值:返回 input 重复 multiplier 次后的结果
实例:

<?php

echo str_repeat("-=", 10);

?>

  以上例程会输出:

=-=-=-=-=-=-=-=-=-=

 

posted @ 2021-01-13 09:05  梦中程序员  阅读(48)  评论(0)    收藏  举报