SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict madproject.com's Avatar
    Join Date
    Jan 2003
    Location
    Ottawa, Canada
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple question: Escaping ""

    I have the following statement


    PHP Code:
     $querydel "DELETE FROM somewhere WHERE something = '$remove' AND somethingelse = '$arow[\"id\"]'"

    The problem is I don't know how to include this $arow["id"]
    within the statement. because it's surrounded by "" and '' already.

    Thanks
    Free Picture and Video Hosting
    [http://photocabin.com][http://madproject.com]

  2. #2
    ********* Member website's Avatar
    Join Date
    Oct 2002
    Location
    Iceland
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it is generally bettor simply not to place variables within the ""
    instead do:
    PHP Code:
    $querydel 'DELETE FROM somewhere WHERE something = \'' $remove '\' AND somethingelse = \'' arow['id'] . '\''
    - website

  3. #3
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $querydel "DELETE FROM somewhere WHERE something = '$remove' AND somethingelse = '$arow[id]'"
    That would be one way, or the way website suggested.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.


Bookmarks

Posting Permissions

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