1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Replace "

Discussion in 'PHP' started by cancer10, Jun 8, 2007.

  1. #1
    Hey


    Does anyone knows how do I replace a " (double quote) in a string with nothing

    I tried the following but does not work

    $message = str_replace(""","",$_REQUEST['txtMessage']);
    or
    $message = str_replace("""","",$_REQUEST['txtMessage']);
    or
    $message = str_replace("\"","",$_REQUEST['txtMessage']);
    Code (markup):

    Plz help

    Thanx
     
    cancer10, Jun 8, 2007 IP
  2. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $message = str_replace('"', '', $_REQUEST['txtMessage']);
     
    decepti0n, Jun 8, 2007 IP
  3. cancer10

    cancer10 Guest

    Messages:
    364
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    worked thanx :)

    Had to add stripslashes(str_replace('"','',$_REQUEST['txtMessage']));
     
    cancer10, Jun 8, 2007 IP