I need to display different HTML if the browser is IE6/IE7. I know conditional comments work fine if we're just talking about styling information but in this particular case it's the actual markup.
I will have an unordered list of images which will be png-24. They will have rounded corners (hence the need for the transparency provided by png-24) and will have rounded border styling in the CSS(3). With IE6 not recognising png-24's I want to have an alternate list of images which are jpg's which already have the borders included in the image. This will keep IE6/IE7 happy whilst the standards compliant browsers will get the proper version.
(I'm doing it this way because the site will potentially grow to many images and it needs to be easily themed. If I produce the borders in code one simple change to border-color and it changes site wide. I realise IE will still have to be manual but I can create a separate charge for this if they really want it supported by IE6.)
So my question is what is the best way to do this using PHP and are there any downsides?