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 basic steps to store PHP session in to Database?

1 Answers   Rediff,


Is facebook still written in php?

0 Answers  


What is smarty?

0 Answers  


What are the features and advantages of object-oriented programming in php?

0 Answers  


How can we determine whether a php variable is an instantiated object of a certain class?

0 Answers  






how to include a datepicker in a form using php and mysql

2 Answers  


What are the different opening and closing tags available in PHP?

0 Answers  


What is the name of scripting engine in php?

0 Answers  


How does firefox manage cookies?

0 Answers  


What is the use of trim function in php?

0 Answers  


hi i am complted my b.tech and i want to learn php is php is good for my career and i want to know the salary growth on php any one can tell the answer plz and i am learning php myself it is easy to understand..........

3 Answers  


Do loops php?

0 Answers  


Categories