title: PHP loop is not throwing the correct link
body: <p>for my issue i'll try to be as brief as possible</p>
  
  <p>what am trying to do is reference a page with a specific id in the HTML anchor link with PHP as the below</p>
  
  <pre><code>&lt;body&gt;
  &lt;?php  $linkName = "Second Page"; ?&gt;
  &lt;?php $id = 5; ?&gt;
  
  &lt;a href="secondPage.php?id=&lt;?php echo $id;?&gt;"&gt;&lt;?php echo $linkName?&gt;&lt;/a&gt;&lt;br&gt;
  </code></pre>
  
  <p></p>
  
  <p>and it works fine</p>
  
  <p>now what am trying to do is to make the $id part more dynamic by making looping the number from 1 to 10 and also providing 10 links</p>
  
  <p>the code is</p>
  
  <pre><code>&lt;/head&gt;
  &lt;body&gt;
      &lt;?php  $linkName = "Second Page"; ?&gt;
      &lt;?php $id = 5; ?&gt;
  
      &lt;?php  
          for ($i=0; $i &lt; 10 ; $i++) { 
              echo "&lt;a href='secondPage.php?id=&lt;?php echo $i;?'&gt;Link1&lt;/a&gt;";
          };
  
      ?&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>however what i did notice as the below images indicates when i hover on the links i noticed that i refer to a strange link</p>
  
  <p><a href="https://i.stack.imgur.com/yqFoE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yqFoE.png" alt="Strange Link"></a></p>
  
  <p>and when i cliched on it it takes me to the following link with an id that i did not want as below</p>
  
  <pre><code>http://localhost/PHP_Course/secondPage.php?id=%3C?php%20echo%201;?
  </code></pre>
  
  <p>i tried researching the subject and i tried escaping the quotation but it does not seem to resolve the problem</p>
  
  <p>Any help please ??</p>