0

When I copy the words with double quotes, .php pages show an error. Double quotes don't get copied normally. How can I solve it? Which codes can I edit? (My script is Wordpress.)

Example: $goster = getenv(“HTTP_USER_AGENT”);

Before HTTP and after AGENT double quotes in example above. It is a problem with my users. I think I must edit in blockquotes function in Wordpress. Any idea?

2
  • When I copy $goster = getenv(“HTTP_USER_AGENT”); as you see double quotes looks like ” but it has to be ". ” --> "
    – eyüpp
    Commented Jan 13, 2013 at 12:27
  • ı m copying from web site to .php file in my desktop.
    – eyüpp
    Commented Jan 13, 2013 at 12:32

1 Answer 1

1

Those are smart quotes (e2 80 9c), and aren't considered string delimiters by the PHP lexer, which it seems you already know.

Replace them with either the single quote ' or double quotes ". If you are copying those from a program which is replacing normal quotes with smart quotes, it's definitely not designed for code and you should stop using it for that purpose.

1
  • yeah. but ı m losing my users for this error. how can ı show it normal double quotes? """" like them.
    – eyüpp
    Commented Jan 13, 2013 at 12:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.