You don't need PHP to do this. It's just simply HTML.
Find an element in the footer that has an ID assigned to it. If there isn't one, then assign one. Then, just link to that ID using a normal link with a hash symbol in front of the ID name.
For instance, let's say the footer is wrapped in a div like this:
Code:
<div id="footer">Footer text</div>
Then, you simply link to it like this:
Code:
<a href="#footer">Jump to the footer</a>