English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String String Functions Manual
The vprintf() function is used to output formatted strings.
vprintf(format, argarray)
It is used to convert a string to a formatted string
Returns the length of the output string.
Number | Parameters and descriptions |
---|---|
1 | format Specify the string and how to format the variables within it Possible format values:
Additional format values. They must be placed between % and the letter (for example %.2f):
Note:If multiple format values are used, they must be used in the order specified above and cannot be rearranged. |
2 | argarray Specify the array to insert parameters, which will be inserted into the format string at the % symbol. |
Try the following example, using 鵽 %s to output formatted strings.
<?php //vprintf uses 鵽 %s to output formatted strings $number = 5; $str = "oldtoolbag.com"; vprintf("There are 쥕lion users for %s.", array($number, $str)); ?>Test and see‹/›
Output Result
There are 5 million users for oldtoolbag.com.