270 users online (0 members and 270 guests)  

  Results 1 to 2 of 2


  1. ISO Character Set Generator    Forum: HTML Forum
    Replies: 1
  2. Remove the new line character from the String    Forum: Javascript Forum
    Replies: 5
  3. Character Customization Script    Forum: Javascript Forum
    Replies: 0
  4. some portugueses character in PERL    Forum: CGI Perl Forum
    Replies: 0
  5. Help - character codes    Forum: HTML Forum
    Replies: 3
  1. #1
    pegboy's Avatar
    Senior Member

    Join Date
    Aug 2001
    Knoxville, TN

    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"?

    robert koons

  2. #2
    QuietDean's Avatar

    Join Date
    Oct 2000
    Bournemouth, UK
    Hi pegboy,

    Its automatically putting the slashes in to escape them, remove them using stripslashes() , example -
    PHP Code:
    $string stripslashes($string); 
    also, stripcslashes() does a similar job

    There is also a function for converting line-breaks to <br /> tags, called nl2br(), similar useage -

    PHP Code:
    $string nl2br($string); 
    have fun
    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?

Tags for this Thread