Home  >  Article  >  Backend Development  >  The difference between PHP double quotes and single quotes

The difference between PHP double quotes and single quotes

不言
不言Original
2018-04-09 17:43:421449browse



I originally thought that there was no difference between double quotation marks and single quotation marks. They both directly output strings. However, when typing the code these days, I suddenly discovered that , when single quotes and double quotes are mixed, sometimes the variables cannot be parsed.

I analyzed it carefully and found that single quotes are only the output of strings, while double quotes can parse variables


Related recommendations:

The difference between && and & operations in php

The above is the detailed content of The difference between PHP double quotes and single quotes. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php event driven designNext article:php event driven design