PHP fprintf() May 21, 2012 Pramod T P It writes a formatted string to a specified output stream Example <?php $fp = fopen(“test.txt”,”w”); echo fprintf($fp,”%s”,”phpcode”); ?> Output 7