Home > DeveloperSection > Interviews > What is the use of sprintf() function?

Posted on    March-18-2011 12:00 AM

 PHP PHP 
Ratings:
 1 Answer(s)
  811  View(s)
Rate this:

Sanjay Sharma
Sanjay Sharma

Total Post:42

Points:210
Posted on    March-18-2011 12:00 AM

The sprintf() function writes a formatted string to a variable.

The arg1, arg2, ++ parameters will be inserted at percent (%) signs in the main string. This function works "step-by-step". At the first % sign, arg1 is inserted, at the second % sign, arg2 is inserted, etc.


Modified On Apr-04-2016 01:13:18 AM

Don't want to miss updates? Please click the below button!

Follow MindStick