Archived topic
Hi Tom, help needed again please
22 replies · Started by itg on August 28, 2016
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>’; ?>
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>’; ?>
WordPress likes to make quotes into curly quotes - no idea why.
Curly quotes will break PHP and cause a fatal errors.
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.
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 :)
You can tell 'em from me too! :)
Old eyes and high resolution monitors, need to use the zoom more often!
Many thanks Neil it worked a treat, your a real star again thanks guys
You are welcome Irv, glad we figured it out in the end.