hello people
i need to get rid of the linebreaks which are submitted with a form a user has to fill out. I got no clue how to do that, because when i access them in php i get no \n signs for the linebreak which i could remove... It's just simple split up in more lines. Has anybody an idea how to remove those?
thx
$string=preg_replace("/\n/"," ",$string);
this uses PERL compatible regular expressions to replace the newline character with a space.
mhh maybe i didnt explain it well enough but the string itself wouldnt contain any linebreaks(like this \n) it wouldnt look like this asdf\n\fdas\n but asdf fdas
you see my problem ?
i cant replace the \n because it doesnt exist the php version of the post variable is already formated with linebreaks but i need to get rid of them
And why do you think the string looks like asdf fdas
with each line on a new line?