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 is php full form?

0 Answers  


What are the methods of array in java?

0 Answers  


Do you know what is use of count() function in php?

0 Answers  


What is magic quotes?

0 Answers  


What is return value in php?

0 Answers  






Which methods should be used for sending an email using the variables $to, $subject, and $body?

0 Answers  


What is the difference between php traits vs interfaces?

0 Answers  


What is php good for?

0 Answers  


What does $_server mean?

0 Answers  


What are the advantages and disadvantages of cascade style sheets?

0 Answers  


can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com

3 Answers  


What does $globals means?

0 Answers  


Categories