码迷,mamicode.com
首页 > Web开发 > 详细

php str_repeat()函数 语法

时间:2019-11-18 13:09:47      阅读:78      评论:0      收藏:0      [点我收藏+]

标签:top   als   idt   说明   tab   作用   div   class   hello   

php str_repeat()函数 语法

str_repeat()函数怎么用?

php str_repeat()函数用于重复使用指定字符串,语法是str_repeat(string,repeat),此函数把字符串重复指定的次数。大理石平台

作用:重复使用指定字符串

语法:str_repeat(string,repeat)

参数:

参数 描述
string 必须,要重复的字符串
repeat 必须,规定字符串重复的次数,必须大于等于0

说明:str_repeat()函数把字符串重复指定的次数

php str_repeat()函数 示例

<?php
$i = "hello world!";
$j = str_repeat($i,3);//设置字符串重复的次数为3
echo $j;
?>

php str_repeat()函数 语法

标签:top   als   idt   说明   tab   作用   div   class   hello   

原文地址:https://www.cnblogs.com/furuihua/p/11881287.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!