I want to get a image size according to the width and also I'm resizing the width if more then 500px
Here is my code so far
list($width, $height) = getimagesize("MyImage.jpg");
if ($width<300){
$NewWidth = $width;
}else{
$NewWidth = '500';
}
Just like to know how to get new height according to the width. Really appreciate your help or any advice you can give.