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

What are the design patterns in php?

0 Answers  


how many error types in php? name there?

5 Answers  


Specify array sort functions available in php ?

3 Answers  


Describe which programming language does php parallel to?

0 Answers  


What is a controller in programming?

0 Answers  






What are php libraries?

0 Answers  


How values in arrays are indexed?

0 Answers  


What is the difference between mysql_connect and mysql_pconnect ? Which one is good in terms of performance ?

4 Answers  


Why do we use csrf token?

0 Answers  


What is http php?

0 Answers  


What is preg_match?

0 Answers  


Explain about image types in detail?

1 Answers   Aplora,


Categories