0
What is different between using " " and ' ' in php
using " and '
2 Respostas
+ 2
variables will be replaced with their values between ", but will not between '.
$a = 5;
echo "$a\n";
echo '$a\n';
+ 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.