Q: Update a URL using a variable - PHP I would like to assign a variable into the PHP code, which will change my URL. For example
$page = 'http://www.example.com/search-products?type=buildings&q=small&go=Go';
Where q=small i would like to change to say q=big (using a variable)
I have assigned a variable within PHP but i am unable to get it to work?
for example 
$q= 'big';
$page = 'http://www.example.com/search-products?type=buildings&q=$q&go=Go';
The url does not however update - Any help would be appreciated

A: Use strings with " and not with ' if you're using variables in it.
$page = "http://www.example.com/search-products?type=buildings&q={$parameter}&go=Go";

A: Check this :
$page = "http://www.example.com/search-products?type=buildings&q={$q}&go=Go";

Note: Single quotes don't work in this case.
If you use Single quotes, you see something like this :
echo 'q={$q}';
//Output => q={$q}

