Home >Backend Development >PHP Tutorial >请教下这个百分号是啥意思啊 看不懂

请教下这个百分号是啥意思啊 看不懂

WBOY
WBOYOriginal
2016-06-13 12:11:001074browse

请问下这个百分号是啥意思啊 看不懂

------解决思路----------------------
这是 转换字符   PHP的sprintf是对c中sprintf的封装
 
用于表示格式化字符串的时候   如何格式化对待对应位置的参数 

%d - 把对应位的参数转换当成带符号十进制数  然后替换%d 
%s - 把对应位的参数转换字符串 然后替换%s

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn