Install ImageMagick on your server, and you can use the identify command. If you're working alot with images in php, chances are you'll run into situations that GD alone can't handle. Here's an example of how I would probably do it with a shell call to ImageMagick:
$shell_command = 'identify -format "%x,%y" /path/to/image';
$resolution = array();
$resolution = explode(',' , shell_exec($shell_command));
$res_x = $resolution[0];
$res_y = $resolution[1];
{edit}
whoops...forgot the links:
ImageMagick identify command
-format argument