PHP sprintf() 函数
来源:互联网 发布:天音淘宝复制大师官网 编辑:程序博客网 时间:2024/05/22 09:05
实例
把百分号(%)符号替换成一个作为参数进行传递的变量:
<?php$number = 2;$str = "Shanghai";$txt = sprintf("There are %u million cars in %s.",$number,$str);echo $txt;?>
sprintf() 函数把格式化的字符串写入变量中。
arg1、arg2、++ 参数将被插入到主字符串中的百分号(%)符号处。该函数是逐步执行的。在第一个 % 符号处,插入 arg1,在第二个 % 符号处,插入 arg2,依此类推。
阅读全文
0 0
- PHP中的sprintf()函数
- PHP 之 函数 sprintf()
- PHP sprintf() 函数
- PHP sprintf() 函数
- PHP sprintf() 函数
- PHP sprintf() 函数
- PHP sprintf() 函数
- PHP sprintf() 函数
- PHP sprintf() 函数
- PHP sprintf函数
- php函数---sprintf()
- PHP sprintf() 函数
- PHP sprintf() 函数
- php之sprintf()函数
- PHP sprintf()函数详解
- PHP sprintf() 函数
- PHP sprintf() 函数用法
- PHP sprintf() 函数
- PHP中sort()函数的参数SORT_LOCALE_STRING具体有什么用?
- 使用Google Earth Engine(一):提取下载MODIS、Landsat点数据
- Python使用扩展库pywin32实现批量文档打印
- Ubuntu16.04下Java环境安装与配置
- 【Leetcode】【python】Longest Valid Parentheses
- PHP sprintf() 函数
- mysql触发器的实例
- UVA
- Google Earth Engine简介
- Codeforces Round #433 C. Planning(贪心)
- HTTP与HTTPS的区别
- 机器学习(数据集的选择)
- 并查集-----hihocoder无间道之并查集
- Python3爬虫之破解图片防盗链