Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP Functions Introducing Functions PHP Function Arguments

At the 2:00 part of the video, teacher said, it would not work because, it has to be in double quotes. Whats the diffenc

What's the difference in using single and double quotes in php? In html, I believe we can use both? It will just yield same results. Is it different in php?

1 Answer

Steven Parker
Steven Parker
231,248 Points

Variable substitution is only performed on strings that are enclosed in double quotes. With single quotes, you'll get exactly what's between them.

Try a little experiment using both and see for yourself!