Well, I am making a script which will resize the image when uploaded, however, i am making a multi-uploader, so i came across with a problem: an efficient way of getting a pictures height and width and storing them in an array to resize later. This is what i came up with:
<?php
$links = array("test1.jpg", "test2.png");
$sizearray = array();
$count = count($links);
for($i = 0; $i < $count; $i++) {
$size = getimagesize($links[$i]);
list($width, $height) = $size;
$sizearray[$links[$i]] = array("width" => $width, "height" => $height);
}
print_r($sizearray);
?>