hii,
it may b very simple or very basic thing but iam confused in this case...any one can explain usage of single & double quotes in echo statement
<?php
$x = "test";
echo '$x';//produces $x as a output
echo "$x"; //produces test as a output
?>
hii,
it may b very simple or very basic thing but iam confused in this case...any one can explain usage of single & double quotes in echo statement
<?php
$x = "test";
echo '$x';//produces $x as a output
echo "$x"; //produces test as a output
?>
Hi,
if you want to return the value of a variable then use double quotes, if you want to return plain text, then use single quotes.
For more information check the documentation:
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.