Murat BIYIKLI wrote: >if there are unknown number of newlines >repeating like (\r\n\r\n\r\n) in a post >var and if I want to change them to a >SINGLE newline, what kind of an iteration >should be used? The >message may like below >in DB and as you see the \r\n newline codes >may repeat severaltimes and should be changed > to only one SINGLE newline and after read >from DB it will be easily coverted to BR tag >by nl2br($foo) func. Instead of using nl2br you could just use $foo=preg_replace("/(\r\n)+/","<br>",$foo). --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php