How to Use vsprintf in PHP
In this article I will explain how vsprintf Function can be used in PHP.
vsprintf() Function
This function writes a formatted string to a variable.
Syntax
vsprintf(format,argarray) |
Example
<html>
<body>
<?php
$str = "Hi";
$number = 123;
$txt = vsprintf("%s Swati. Day number %u",array($str,$number));
echo $txt;
?>
</body>
</html> |
Output
You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here