how do I make a link show as active using php

I have an image for the rollover, and image for the page

I know I need to put this at the top:
<?php $pageName = "fire"; ?>


But then how do I get an image to change when it gets to the "fire" page?

<a href="fire.php" <?php if ($pageName=="fire") echo 'id="imagegoeshere?"'; ?>></a>