/**
* Get image width and height
* @param string $img (url or folder)
* @return array [ width, height ]
*/
function getImageWidthHeight($img){
$size_array = getimagesize($img);
$size_parts = explode("\"", $size_array[3]); // 1 and 3
$size['width'] = (int)$size_parts[1];
$size['height'] = (int)$size_parts[3];
return $size;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.