Single Quotes vs Double Quotes

Single Quote Example

Hello, $name! This is single-quoted.

Double Quote Example

Hello, Jordein! This is double-quoted.

Explanation

Double and single quotes work differently in PHP. Everything inside single quotes is printed exactly as typed, a variable like $name wont be replaced by its value. PHP recognizes variables with double quotes and swaps them out for their actual value automatically.