Google News
logo
PHP - Interview Questions
How can you get the size of an image in PHP?
getimagesize() function is used to get the size of an image in PHP. This function takes the path of file with name as an argument and returns the dimensions of an image with the file type and height/width.

Syntax:
array getimagesize( $filename, $image_info )
Advertisement