I am currently working on my portfolio website toddhartsfield.com to be fully responsive. Everything seems to work with iPhone and Android fine, but I am annoyed that when I go to my works page on a mobile device the images of my works are bigger than the devices screen. I want to make a new gallery with the same images optimized for say... a typical iPhone/android screen at 72ppi using a jQuery API known as photoswipe. I have used it before and it worked really well.

PHP is not my strong suit... or programming in general. I did make an attempt to make a block of PHP code.

Thank you so much for your expertise!!! I will work on this and let you how it turns out... Okay this may seem a dumb, but I want to make sure I would put the code in the right area. Near the end should it be like this:

be careful using user agent to determine device, as they can be easily changed etc. you can CSS @media only screen to style based on the size of the screen. here's a good link that has the Media queries for idevices and a couple of others.