Which function in PHP returns a formatted string?

  • sprintf()
  • printf()
  • str_format()
  • format_string()
The sprintf() function in PHP is used to return a formatted string. It allows you to create formatted strings using placeholders and values, similar to printf() in C.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *