I am doing an image upload handler and I would like it to detect the dimensions of the image that\'s been uploaded by the user.
So I start with:
if (isse
list($w, $h) = getimagesize($_FILES['image']['tmp_name']);
From the docs:
Index 0 and 1 contains respectively the width and the height of the image.
Index 2 is one of the IMAGETYPE_XXX constants indicating the type of the image.
Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag.
So you can just do list() and don't worry about indexes, it should get the info you need :)