php gets the image height and width code To get the height and width of an image in PHP, PHP itself has a function getimagesize, which will return an array. The array subscript 1 is the height of the image, and the array subscript 0 is the width.
php tutorial to get image height, width and width code
To get the height and width of an image in PHP, PHP itself has a function getimagesize, which will return an array. The array subscript 1 is the height of the image, and the array subscript 0 is the width.
*/
//you do not need to alter these functions
function getheight($image) {
$size = getimagesize($image);
$height = $size[1];
return $height;
}
//you do not need to alter these functions
function getwidth($image) {
$size = getimagesize($image);
$width = $size[0];
return $width;
}