I need to get url data printed in the following format below
https://mysite/data/api?q="'xxxxx' in contents"
but each time i run the code below am getting something like this below which is not what I want
https://mysite/data/api?q=xxxxx in contents
here is what I have tried
$my_id = 'xxxxx'; $myurl= "https://mysite/data/api?q={$my_id}"; echo $myurl . " in contents";
Advertisement
Answer
Try like this HTML code in your variable declaration:
<?php $my_id = '"'xxxxx''; $myurl= "https://mysite/data/api?q={$my_id}"; echo $myurl . " in contents" "; ?>
You will get the output like this:
https://mysite/data/api?q="'xxxxx' in contents"