0

I want to execute a php syntax within a html code. My code is as follow :

return <<<END
<!-- Some HTML code -->
<header id="header">
    <?php include '../src/top.php'; ?>
    <!--LOGO bar / End-->
    <?php include '../src/nav.php'; ?>
</header>
<!-- Some HTML code -->
END;

But unfortunately, the php script have not been executed. I've used another syntax found here :

return <<<END
<!-- Some HTML code -->
<header id="header">
    {include '../src/top.php';}
    <!--LOGO bar / End-->
    {php include '../src/nav.php';}
</header>
<!-- Some HTML code -->
END;

But none solve my problem. How can I fix this ?

Community
  • 1
  • 1
sk001
  • 561
  • 6
  • 27

0 Answers0