Sprintf
Edit entry
编辑词条 -->
The string formatting command is mainly used to write formatted data into a string. Sprintf is a variable parameter function, which often causes problems when used, and as long as there is a problem,
sprintf function PHP's detailed use method, sprintf function php
PHP sprintf () function
First of all, why write the preface to this function, this is I developed in two times a token verification document is a sample document see a function, then
Sprintf function usage in PHP and sprintf Function
This article describes the usage of sprintf functions in PHP. Share it with you for your reference. The usage analysis is as follows:
The sprintf () function is officially used to format and output
I. Definition and usage
The sprintf () function writes the formatted string to the variable.
The Arg1, arg2, + + parameters are inserted into the main string at the percent sign (%) symbol. The function is executed incrementally. At the first%
This article mainly introduces the sprintf function usage in PHP, and analyzes the common usage of sprintf function formatting and output in the form of instances in detail, which has some reference value, for more information about sprintf
This article gives you a summary of 7 kinds of PHP commonly used print output functions, respectively, is Echo,print,printf,sprintf,print_r,var_dump,die, I hope we can help you learn PHP This article has been to learn all the functions in PHP for
This article mainly introduces the sprintf function usage in PHP, and analyzes the common usage of sprintf function formatting and output in the form of instances in detail, which has some reference value, for more information about sprintf
This example describes the use of sprintf functions in PHP. Share to everyone for your reference. The specific usage analysis is as follows:
sprintf () function in the PHP official is said that the string format output, this article will give you
We know that the sprintf () function writes a formatted string to a variable, and we often see this type of code, let me introduce the sprintf () function using the method, a friend who needs to refer to the reference.
Usage
sprintf (format,arg1,arg2
The PHP function sprintf () function is officially defined as: sprintf (): Writes a format string to a variable
The syntax is:sprintf (format,arg1,arg2,arg++);
Parameters:Format: must, convert formattingArg1: Must, specify the parameter to insert
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.