CoderZone.org

Category: >> PHP Code >> BR2NL Function - Opposite of NL2BR Bookmark and Share

<< lastnext >>

Snippet Name: BR2NL Function - Opposite of NL2BR

Description: Simple way to do the opposite of what the nl2br() function does- turns breaks (
) into new lines.

Also see:
» Auto-link text with a given set of
» Convert Minutes to Days, Hours, an...
» Remove empty lines from text files
» Resize and convert an image to a P...
» Convert text to image in php
» Reading and Writing to text files ...
» Select text in a DIV, SPAN, or tab...
» Random Text in ASP
» Convert RGB to Hex with ASP
» Convert a String to Title Case in ...
» Create an array from words in an H...
» Create an array from the lines of ...
» Convert Extensions To Lowercase
» Tabs-To-Space Converter
» Convert Unix time string to a date...
» Reversing text command
» Convert Dollars And Cents Value to...
» LDAP Timestamp Converter
» Create Filler Text
» Convert entities into normal chara...
» Easily Change Text To Lowercase
» Format money as millions, billions...
» Convert Seconds to Hours:Minutes:S...
» Truncate text while preserving HTM...
» Convert UK Dates To mySQL Format D...
» Convert miles to feet, feet to mil...
» Calculate the difference between t...
» Limit Text Area Characters
» Flip Text Upside Down
» Converting Rows to Columns

Comment: (none)

Author: CoderZone
Language: PHP
Highlight Mode: PHP
Last Modified: June 13th, 2010

function br2nl($string){
return preg_replace('#<br\s*?/?>#i', "\n", $string); 
}
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 7