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.
<?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!";
}
?>
<html>
<body>
<form action="kids.php" method="post">
// $i=2; here and below line is not working. This is the problem.
<a href="http://www.abcd.com/kids.php/<?php echo $pages[$i];?>" <?php echo $pages[$i];?></a>
</form>
</body>
</html>
The line works when I use question mark "?" after kids.php? and the content is also changing:
<a href="http://www.abcd.com/kids.php?<?php echo $pages[$i];?>" <?php echo $pages[$i];?></a>
My problem is that I want to use / instead of question mark ?