PHPMule.com Blog
PHP for beginner’s
Welcome to PHPMule.com
A blog site which I am posting to during my learning of the popular programming language PHP. Feel free to leave comments!
-
PHP - The nl2br() Function
This function stands for: New Line 2 Break
If the visitor wanted to see what he or she has entered on a form it would appear on one line if it was echoed. If we use the nl2br() function it would echo the feedback with the new lines replaced with breaks:
If we used it without this function is would look like this:
Forename: Nathan Comments: It looks better with the nl2br() dont you think?
If we used with nl2br() it would look like this:
Forname: Nathan
Comments: It looks better with the nl2br() dont you think?
echo nl2br($feedback);
(Post created on Monday, April 12th 09 at 17:15)
-
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
Archives
Recent Articles
- PHP - Rounding Off Numbers
- PHP - Single vs Double Quotation Marks
- PHP - Loading Files Into Your PHP Script By Using require() and include()
- PHP - Replacing Strings With Other Strings
- PHP - Finding Strings Within Strings
- PHP - Using strlen() To Test String Length
- PHP - Using The explode() Function
- PHP - Changing The String Case
- PHP - The nl2br() Function
- PHP - Trimming Strings
Links
Categories
- PHP (22)
- Uncategorized (1)
Powered by WordPress
Designed by My Mobiles


