title: How to use echo in url
body: <p>i am trying to use echo inside url. i have store data from the form in database and now i am also fetching it on my page and its working well. Now i am trying to print that data i.e. number and date in url. </p>
  
  <p>Is it possible and if possible please help me out</p>
  
  <p>here is my data that i am fetching and it prints the output</p>
  
  <pre><code>echo $number;
  echo $yyyymmdd;
  </code></pre>
  
  <p>and here is my url in which i want to insert ' echo $number; ' and ' echo $yyyymmdd; ' on the place of  and .</p>
  
  <pre><code> $json= file_get_contents("http://api.com/api/a2/live/apikey/fc5a69f870fdb03/number/&lt;number&gt;/date/&lt;yyyymmdd&gt;/");
  </code></pre>
  
  <p>I have also tried something like this but it gives error of syntex error.</p>
  
  <pre><code>$json= file_get_contents("http://api.com/api/a2/live/apikey/fc5a69f870fdb03/number/"echo $number;"/date/"echo $yyyymmdd;"/");
  </code></pre>