PHP Single and Double Quotes

Single Quotes Example

Hello, my name is Ward.

Double Quotes Example

Hello, my name is Ward.

Explanation

Single quotes and double quotes can both be used to create strings in PHP. The main difference is that double quotes can recognize variables and display their values directly inside the string. Single quotes usually display the text exactly as it is written and do not automatically replace variables with their stored values.


Back to Activity 3 Home Page