PHP空间函数类似于ASP空间()
16lz
2021-01-22
Is there a function that will print a spceified number of spaces in PHP?
是否有一个函数可以在PHP中打印出一定数量的空格?
Here is the ASP equivelant example:
这是ASP equivelant示例:
Dim txt
txt=Space(10)
document.write(txt)
Output:
" "
2 个解决方案
#1
3
Yes, str_repeat
is the thing you want.
是的,str_repeat是你想要的东西。
str_repeat
str_repeat
<?php
echo str_repeat("x", 10);
?>
will output
将输出
xxxxxxxxxxx
更多相关文章
- PHP基础示例:商品信息管理系统v1.1[转]
- 040-PHP使用闭包函数来进行父实例的变量自增,正确示例
- mysql锁机制之示例讲解
- MySQL 示例数据库sakila
- MySQL官网示例数据库emploees分析使用
- 高德地图api接口poi检索示例----并在信息框显示经纬度
- Objective-C方法/函数调用。 (来自javascript示例)
- 有一个简单但有用的jquery.JsPlumb示例吗?
- 在Javascript中将带有空格的字符串数组转换为小写,然后在Webkit中