so i have two files index.php and footer.php. and i want to add a jquery script to my index.php. so i did this and it works fine:
index.php
<html>
<body>
<script type = "text/javascript" src = "JQUERY/jquery.js"></script>
<?php
include("include/footer.php");
?>
footer.php
<script type = "text/javascript" src = "JQUERY/jquery.js"></script>
</body>
</html>
problem is that why do i need to add same script two times? should i just add jquery script only in footer.php. and since iam adding include in index.php. it should add the script too. for ex:
index.php
<html>
<body>
<?php
include("include/footer.php");
?>
footer.php
hellowworld
<script type = "text/javascript" src = "JQUERY/jquery.js"></script>
</body>
</html>
but this doesnt work and i cant seem to find out why?
note inlude tag is working right. it does print helloworld in index.php