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 join strings together?

How do I check if a string contains HTML?

How do I make sure a string is a certain length?

How do I print the " in an echo statement?

What is the usage of { } in string handling in php?



Custom Search