Pregunta

I am making a website using HTML. I am not familiar with PHP. I need the navigation and header part to be in a single place. i.e., Once I change the menus in one place it should reflect in all other pages. Kindly help me on this.

Thanks in Advance.

¿Fue útil?

Solución

You could use include or require to add your Menu-Html file in every page you wish. you could add something like this:

<?php 
    include('menu.html');
?>

wherever your menu should appear in your HTML, having a menu.html file of course. and you'll need an apache server or any other that can 'read' your php files.

include php documentations

require php documentations

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top