Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > need to get rid og new line extra spaces
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 19th November 05:41
itpvision
External User
 
Posts: 1
Default need to get rid og new line extra spaces



Hello,
I have a wysiwig textarea editor, something like this one, I want to
update my text, the content is retrieved from database and inserted
into this textarea through a javascript function, the first arguemnt
passed, which is the data from database, contents additional new
lines, so this causes a javascript error,

I have tried these:

$des = mysql_result($select2 , 0 , 'des');

$des = stripslashes($des);
$des = html_entity_decode($des);
$des = str_replace("\n", " ", $des) ;
$des = preg_replace("/\r?\n/", "", $des);

I still see new lines after divs, uls, ols, li(s) lists
Help appreciated
itpvision@yahoo.com
  Reply With Quote


 


Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Php 5 forum, Apache forum, Iis forum, Functions forum, Classes forum, Librarys forum, Bugs forum, Postgres forum, Mysql forum, Paradox forum, Ms sql forum, Configurations forum, Php.ini forum, Problems forum, Scripting forum, Css forum, General forums, Off-topic talk, Links, Extra forums, Php


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666