Thread: php - sub character
Results 1 to 2 of 2
ISO Character Set Generator Forum: HTML ForumReplies: 1
some portugueses character in PERL Forum: CGI Perl ForumReplies: 0
Help - character codes Forum: HTML ForumReplies: 3
10-09-2003, 11:04 AM #1
php - sub character
ok, the last project was a bit over my head, so i found out...
i'm working on a stripped down version now, and it's working. woot woot!
i do have two little problems...
when some one types the ' character it reads back with forward slash marks. i don't think this is a tough one, but i can't find anything on it.
also, i'm trying to format the text like the user has it. how can i tell it to add a "<br> tag when it comes to a "\n"?
10-09-2003, 11:50 AM #2
Its automatically putting the slashes in to escape them, remove them using stripslashes() , example -
$string = stripslashes($string);
There is also a function for converting line-breaks to <br /> tags, called nl2br(), similar useage -
$string = nl2br($string);
If one of our members helps you, please click the icon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?