How to Use vfprintf in PHP

In this article I will explain how vfprintf Function can be used in PHP.
  • 1419
vfprintf() function

This function writes a formatted string to a specified output stream.

Syntax

 vfprintf(stream,format,argarray)

Example

<html>
<body>
<?php
$str = "Hello";
$number = 007;
$file = fopen("test.txt","w");
echo vfprintf($file,"%s world. Day number %u",array($str,$number));
?>
</body>
</html>

 

Output

vfprintf-php.jpg

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

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.