Single and Double Quotes in PHP

Double quotes example: My name is Sharmin.

Single quotes example: My name is $name.

Double quotes in PHP can interpret variables inside the text, so the value of a variable can appear directly in the output. Single quotes usually treat the text literally, so variable names are displayed as written instead of being replaced by their values. This makes double quotes useful when variables need to appear inside a string.

Back to Activity 3