0

What is different between using " " and ' ' in php

using " and '

2nd Jul 2017, 6:40 PM
Aloka Devapriya
Aloka Devapriya - avatar
2 Respuestas
+ 2
variables will be replaced with their values between ", but will not between '. $a = 5; echo "$a\n"; echo '$a\n';
2nd Jul 2017, 7:04 PM
A l
A l - avatar
+ 2
there are two types of strings. First is here doc and second one is quote string. In quote string there are two types of method- ", ' single quote and double quote. In single quote all things written on it will be used. And on double quote it will look for variable first before using strings anywhere.
3rd Jul 2017, 1:51 PM
Animesh
Animesh - avatar