title: php variable inside echo 'html code'
body: <p>I have php file index.php</p>
  
  <p>In this file to use html code I am doing:</p>
  
  <p>index.php</p>
  
  <pre><code>echo '
  &lt;div&gt;
  &lt;a class="fragment" href=""&gt;
  &lt;div&gt;';
  </code></pre>
  
  <p>In href I want to put value of some php variable i.e. <code>$url</code>  <strong>How could be done?</strong></p>
  
  <p>is this correct way?</p>
  
  <pre><code> &lt;a class="fragment" href="&lt;?php echo $url; ?&gt;"&gt;
  </code></pre>