The difference between PHP double quotes and single quotes

不言
Release: 2023-03-23 12:54:02
Original
1493 people have browsed it



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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template