What is The difference between ' and " where they can ben
in between or outmost and how

Answers were Sorted based on User's Feedback



What is The difference between ' and " where they can ben in between or outmost and how..

Answer / uttam thakor

variables and escape sequences for special characters will
not be expanded when they occur in single quoted strings.

E.G.

$var = 10;

//if we type
echo "$var"; // output : 10
echo '$var'; // output : $var

echo "\nabc"; //output: abc
echo '\nabc' //output :\nabc

Is This Answer Correct ?    7 Yes 0 No

What is The difference between ' and " where they can ben in between or outmost and how..

Answer / rajesh

variables within "" are evaluated where as variables within
'' are printed as it is, and execution of '' based statement
are faster when compared to ""

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More PHP Interview Questions

Explain Whitespace Characters?

0 Answers  


Is server side a session?

0 Answers  


What is final class and final method in php?

0 Answers  


What is the use of 'print' in php?

0 Answers  


What are the difference between overloading and overriding in oops?

0 Answers  






Does session expire on closing browser?

0 Answers  


How to get the total number of values in an array?

0 Answers  


What are traits? How is it used in php?

1 Answers  


What are advantages of .htaccess?

0 Answers  


Does php pass arrays by reference?

0 Answers  


Tell me what is mean by an associative array?

0 Answers  


What is the difference between $var and $$var?

0 Answers  


Categories