php - How do I make Text Editor display an apostrophe instead of a single quote?




It sounds like you have TextEdit in rich text mode. This will only cause you horrible pain trying to write code.

You can use Shift+Cmd+T, or the menu itemFormat -> Make Plain Text if you're editing code.

There are better choices for code editors on OSX though, like TextWrangler, which is free.




You won't change PHP syntax unless you wan't to write your own interpreter :P

If you want to display for user an apostrophe you need to escape it with \'

Moreover, you can echo string also with double quote so:

<?php echo '<p>Hello World</p>'; ?>
<?php echo '<p>\'Hello World\'</p>'; ?>
<?php echo "<p>Hello World</p>"; ?>

will work.

You will find more information about strings here




Try changing the font to Arial, I just checked and it appears to use the apostrophe instead of the single quote, when I copied and pasted the example it recognized both characters

People are also looking for solutions to the problem: php - Laravel - Post request empty fields


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.