1.

Different way to include variable in double quotes in php

Answer»

Here in below example i have used variable in double QUOTES and CREATE three FORMATS to use variable
(1)IN First row i have simple used variable in echo
(2)In second and third i have used variable inside string
And code is as below

< ?php
$Question = 'GetProductPrice';
echo "$Question .com is good website. ";
echo "Latest Interview Questions on ${Question}.com ";
echo "Good Interview Questions on {$Question}.com.";
? >


output of above is
Getproductprice .com is good website
Latest Interview Questions on Getproductprice.com
Good Interview Questions on Getproductprice.com



Discussion

No Comment Found