I'm fairly new to programming and I've recently started learning PHP. I came across a function called `printf()` and I'm not quite sure how to use it correctly. From what I understand, it's used to output a formatted string.
Can someone please explain to me how to use the `printf()` function in PHP? I would really appreciate it if you could provide an example as well.
Thanks in advance!