PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I format the output of a string?


If you wish to format the output of a string, then you need to use the printf function, think of it in terms of 'print formatted'.

There are a large range of uses for this function and rather than repeat the detailed documentation, take a look at the PHP manual page on sprintf here:

http://uk3.php.net/manual/en/function.sprintf.php

Comment on this Question and Answer >>>

ASK A QUESTION

More strings PHP Questions

How do I escape a string with slashes?

How do I remove trailing whitespace from a string?

Hello, Is it possible to specify a character-encoding in the filter_var function. Thank you for your reply, Jan

How do I reverse a string in PHP?

How do I extract the values of variables from a string?



Custom Search