[Resolved] Hi Tom, help needed again please

Home Forums Support [Resolved] Hi Tom, help needed again please

Home Forums Support Hi Tom, help needed again please

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #222202
    Neil

    Jeez damn curly quotes! Above copy and paste got converted in pasting and made the top working example slanting/curly too, had to paste and edit to get the correct straight apostrophes. If you cannot see the difference Control + a few times to zoom in.

    The first code at top of this page has slanting ones all through, hence the problems.

    Works – <?php echo ‘<p>Hello World</p>’; ?>

    Doesn’t work – <?php echo ‘<p>Hello World</p>’; ?>

    #222203
    Neil

    Did it again when I posted! Ok that is why you need to select and click the code tab. Trying again.

    Works – <?php echo '<p>Hello World</p>'; ?>
    
    Doesn’t work – <?php echo ‘<p>Hello World</p>’; ?>
    #222216
    Tom
    Lead Developer
    Lead Developer

    WordPress likes to make quotes into curly quotes – no idea why.

    Curly quotes will break PHP and cause a fatal errors.

    #222223
    Neil

    Never noticed that before, learn something new every day Tom! haha

    Maybe a sticky topic to alert people to this? Easily fixed by selecting and clicking the Code tab when pasting code, could save some angst trying to get curly quoted PHP to work.

    #222224
    Tom
    Lead Developer
    Lead Developer

    Yea possibly, not sure how often people look at those sticky topics though.

    I might just to tell WordPress not to add curly quotes in the first place – looking into it 🙂

    #222227
    Neil

    You can tell ’em from me too! 🙂

    Old eyes and high resolution monitors, need to use the zoom more often!

    #222228
    itg

    Many thanks Neil it worked a treat, your a real star again thanks guys

    #222229
    Neil

    You are welcome Irv, glad we figured it out in the end.

Viewing 8 posts - 16 through 23 (of 23 total)
  • You must be logged in to reply to this topic.