PHP Single and Double Quotes

This sentence is displayed using single quotes.

Hello Zubia! This sentence is displayed using double quotes.

Explanation

Single quotes and double quotes can both be used to display text in PHP. One important difference is that double quotes can recognize variables and display their values inside the text. Single quotes usually display the text exactly as it is written and do not automatically replace a variable with its value.

Back to Activity 3