#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    6
    Rep Power
    0
    I'm trying to get the '>' in a string into a variable but it doesn't display and everything in front it of disappears. I've tried using '' to escape it but this has no effect. What a m I missing? TIA
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    179
    Rep Power
    15
    Can you give the full example of the string you are placing into the variable? What else besides the > sign?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    6
    Rep Power
    0
    This is what I was trying to do:

    $var .= "<OPTION VALUE="" . $row["id"] . """>" . $row["name"];
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    33
    Rep Power
    15
    I think you've made a mistake there:

    $var .= "<OPTION VALUE="" . $row["id"] . """>" . $row["name"];

    Shouldn't this be:
    $var .= "<OPTION VALUE="" . $row["id"] . "">" . $row["name"]; (one quotation mark instead of two)?
    Stas
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    6
    Rep Power
    0
    Heh, the mistake was in my post. the code in script did not have this error.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 1999
    Location
    London
    Posts
    110
    Rep Power
    0
    just to jump in with my two penneth

    this will work, its out of something I did.

    $var .= "<option value="".$row["id"]."">".$row["name"]."</option>";

    you werent closing it off properly as far as I can see

    hth

    tim

    ------------------
    cheers

Similar Threads

  1. XML > Sablotron > PHP > HELP!
    By Wzd in forum PHP Development
    Replies: 1
    Last Post: January 18th, 2004, 02:05 PM
  2. w3c strict errors (10), css, and js questions
    By WorldBuilder in forum CSS Help
    Replies: 12
    Last Post: November 6th, 2003, 05:48 AM
  3. more telnet trouble
    By f'lar in forum C Programming
    Replies: 4
    Last Post: September 5th, 2003, 12:26 PM
  4. Html -> Xml -> Xslt -> Html
    By ice_man_82 in forum XML Programming
    Replies: 3
    Last Post: July 9th, 2003, 06:11 AM

IMN logo majestic logo threadwatch logo seochat tools logo