Whats the equivalent of the \n to a space character. If you dont understand I mean if theres a space but it doesnt show what would be the character so I can replace it with &"nbsp"; ? (Without the ""s) Thanks Chuckury
Just type a space, like this: " "
\n isn't a space. It's a new line.....
Originally posted by LordShryku \n isn't a space. It's a new line.....
Lol I know that, but what is it a CSS2 character?
and the " " doesnt work!
if you replace every space with   then your lines will not break since you have replaced all the breaking characters (spaces) with non-breaking characters (nbsp). What I recommend is this instead:
<?php $str = "this space stays a space, these spaces become nbsp"; str_replace(" "," ",$str); echo $str; ?>
This will have the same net effect on the output but it will leave single spaces alone so that the text still wraps properly.
he means no quotes, and what the heck are you talking about, you're not making sense at all. please refrain from posting without suffiecient information and assuming we'll figure it out on our own.
Originally posted by Moonglobe he means no quotes, and what the heck are you talking about, you're not making sense at all. please refrain from posting without suffiecient information and assuming we'll figure it out on our own.
moon, If you're talking to me I suggest you reread the initial post.
nono drawmack, i didnt see your post, i started to type before you posted. i was talking to the OP.
okay, no harm - no foul
The str_replace(" "," ",$str); does work, but you might use the ascii-code instead.
http://www.asciitable.com/
knutm :-)
$str = str_replace(" "," ",$str); $str = str_replace(CHR(13)," ",$str); $str = str_replace(CHR(12)," ",$str);
// clean duplicates for($a=0;$a<4;$a++) { $str = str_replace(" "," ",$str); }