You can have a header($array_scripts) function, that display your header and all the scripts inside.
Let's say your scripts are CSS files, and your files are organized that way :
/www
---- /css
---- script1.css
---- script2.css
---- index.php
---- header.php
On your page index.php :
include_once("header.php");
$scripts = array("script1.css", "script2.css");
header($scripts);
// Rest of the code : <body>
And in your header.php file :
function header($array_scripts)
{
// display everything, like <!doctype HTML>, <head> tag...
foreach($array_scripts as $script)
{
echo '<script src="css/'.$script.'">';
}
// close tags like </head>
}
You can even give your title, description, ... as parameters to your header function.
For example, if your header function has this prototype :
header($title, $array_scripts);
You will be able to display the title in header.php with:
// <head> ...
echo '<title>' . $title . '</title>';