Skip to content

PHP String Interpolation

by karlkatzke on December 19th, 2007

When I first started doing PHP back in 2000, PHP4 was brand new. I did some extensive testing to figure out the best way to echo strings. It turned out that the best way was using single quotes, because otherwise the PHP parser parsed the string for variables.

In modern times, this is significantly different. Good to know I don’t have to be picky about my single or double quotes anymore.

From → php

2 Comments
  1. Thanks, Robert. The post’s a few years old now and I guess they changed their link structure. I’ll update my original post.

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS