+ Reply to Thread
Results 1 to 4 of 4

Thread: duble quotes from php into javascript

  1. #1
    Moderator airnine is on a distinguished road
    Join Date
    Jan 2004
    Posts
    78

    Cool duble quotes from php into javascript

    Hi guys,

    I use php and javascript 99% of the time and have a question that's really been bugging me for a while. I have solved it now, but would still like to know how other people deal with this type of things. In both php and javascript one can choose to use either single quotes or double quotes, but what do you do when you pull a message from mysql table that contains double quotes and put it in a php generated javascript alert message? Do you replace " with \" or go for char(34) or some third thing?

    Airnine
    -------------------------------
    Airnine is a developer @
    www.promomedium.com
    -------------------------------

  2. #2
    Full Member Steveo31 is on a distinguished road
    Join Date
    Jan 2004
    Posts
    40
    I have seen \" used most often. I do that in Flash A.S. as well.

  3. #3
    Full Member Matrix28 is on a distinguished road
    Join Date
    Feb 2004
    Posts
    34
    Yeah, as steveo said. Go for the \" option;

  4. #4
    Full Member kitty is on a distinguished road
    Join Date
    Aug 2005
    Posts
    16
    yes u have to use \" or single quate '

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts