How can i dynamically make webpages outputs it's title and metas based on url
<p>I have this website am designing, am using the <code>include()</code> function in php to echo texts and other pages. the thing here is that, i just want one header file and one footer file, the footer file i've gotten that worked out but i want the header file to be able to show it's title, meta keywords and meta description (if view source) based on the page the user wants to visit. For Example</p>

<p>URL 1: index.php will have this as it's title</p>

<pre><code>&lt;title&gt;This is the Home page&lt;/title&gt;
&lt;meta name="keyword" content="this, home, page" /&gt;
&lt;meta name="description" content="welcome to home page" /&gt;
</code></pre>

<p>URL 2: about.php will have this as it's title</p>

<pre><code>&lt;title&gt;About us&lt;/title&gt;
&lt;meta name="keyword" content="about, us, page" /&gt;
&lt;meta name="description" content="This website is about" /&gt;
</code></pre>

<p>I hope am conveying this questions correctly. so the thing now is that if the user goes to a different page say <code>contact.php</code> the title should dynamically change the text i've written about the contact us page and metas should as well change to what i've written it to be. so can anyone help with this issue because am thinking using php arrays but i don't know how to structure the code.</p>
