title: how to echo when user click on anchor tag in php?
body: <p>I want to echo on dynamic url but when I use ? then it is working and when I use / then the url changing but nothing echo out.</p>
  
  <pre><code>&lt;?php
   $pages = array("story1", "story2", "story3", "story4");
  
   if(isset($_GET['stroy2'])) { 
        echo "You are reading Story 2!";
   }
  
   if(isset($_GET['stroy3'])) {
        echo "You are reading Story 3!";
   }
   ?&gt;
  
  &lt;html&gt;
  &lt;body&gt;
    &lt;form action="kids.php" method="post"&gt;
  
      // $i=2; here and below line is not working. This is the problem.
       &lt;a href="http://www.abcd.com/kids.php/&lt;?php echo $pages[$i];?&gt;" &lt;?php echo $pages[$i];?&gt;&lt;/a&gt;
    &lt;/form&gt; 
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>
  
  <p>The line works when I use question mark "?" after kids.php? and the content is also changing:</p>
  
  <pre><code>&lt;a href="http://www.abcd.com/kids.php?&lt;?php echo $pages[$i];?&gt;" &lt;?php echo $pages[$i];?&gt;&lt;/a&gt;
  </code></pre>
  
  <p>My problem is that I want to use / instead of question mark ?</p>