Apostrophe in Text Output

Discussion in 'PHP' started by RobinDeanDotCom, Oct 3, 2006.

  1. #1
    Hello.

    How do I place an apostrophe in the textual output of a php document?

    namely, I want the output to be ::: you're ::: instead of ::: you are :::
     
    RobinDeanDotCom, Oct 3, 2006 IP
  2. ifyn

    ifyn Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    simple escape it with a '\'
    you\'re
     
    ifyn, Oct 3, 2006 IP
  3. kjewat

    kjewat Active Member

    Messages:
    149
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    You can use the &apos html code.

    
    print "You're";
    
    PHP:
    will give You're.
     
    kjewat, Oct 4, 2006 IP