Quotes in PHP

Single Quotes Example

Hello, my name is $name.

Double Quotes Example

Hello, my name is Sapar.

Explanation (30+ words)

In PHP, single quotes treat most characters literally, so variables like $name do not get replaced and will display as plain text. Double quotes interpret variables and certain escape sequences, so the output changes because PHP inserts the variable’s value into the string automatically.