You noted “I am sure there must be a cleaner and better way.” That way would be to avoid multiple if tests through the use of the category ID in each of your header images (i.e. header_cat_1.gif). Then your PHP is pretty simple: