• PHP Video Tutorials

PHP - Function Vfprintf



Syntax

vfprintf(stream,format,argarray)

Definition and Usage

It used to convert formatted string to specific output

Return Values

It returns the length of return string

Parameters

Sr.No Parameters & Description
1

stream

It is used to specifies where to write/output the string

2

format

It is used to specifies string and how to format the variable in it

3

argarray

It is used to specifies an array with argument to be inserted

Example

Try out the following example

<?php
   $input1 = 123;
   $input2 = 456;
   $file = fopen("sample.txt","r");
   
   vfprintf($file,"%f%f",array($input1,$input2));
?>
php_function_reference.htm
Advertisements