-7

I have used inline PHP in HTML, the file extension is .php and it does not seem to work in both cases

<li><a href="<?php echo $link; ?>index.php">Home<?php echo "home";?></a></li>

where $link is defined as

<?php
 $link="pages/";
?>

Thank you in advance.

1 Answers1

-1
  • make sure that your XAMPP server is running
  • make sure that your file inside C:/xampp/htdocs/mysite/