EY Posted March 12, 2008 Share Posted March 12, 2008 Can someone please explain me the difference with some examples please. I have been reading my php book examples but i still do not understand and was hoping to get help on that here. Thanks. Quote Link to comment Share on other sites More sharing options...
revraz Posted March 12, 2008 Share Posted March 12, 2008 Double Quotes parses variables and displays what they contain, Single Quotes will do a literal display. Quote Link to comment Share on other sites More sharing options...
EY Posted March 12, 2008 Author Share Posted March 12, 2008 What are literal display? Quote Link to comment Share on other sites More sharing options...
p2grace Posted March 12, 2008 Share Posted March 12, 2008 The biggest difference is that you can only use variables inside of strings if the string in inside of double quotes. Example: <?php $var = "Hello"; // Won't Work echo '$var'; // will display $var // Will Work echo "$var"; // will display Hello ?> Simple example, let me know if you need further details. Quote Link to comment Share on other sites More sharing options...
EY Posted March 12, 2008 Author Share Posted March 12, 2008 Alright thanks very much. I understand now!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.