i am storeing image in database type long blob.
//STORE IMAGE IN $IMAGE
$image = chunk_split(base64_encode(file_get_contents($_FILES['fileupload']['tmp_name'])));
//store image name in $image_full_name(.jpeg)
$image_full_name = $_FILES['fileupload']['name'];
//store image size in $image_size than conver to 100x100
$image_width_height = getimagesize($_FILES['fileupload']['tmp_name']);
$image_resolution = $image_width_height[0] . "X" . $image_width_height[1]; //size of image 100x100
//get size in binary
$file_size = filesize($file); //get image size, than change to b, kd, mb, or gb
//change image size to b,kb or mb
if ($file_size < 1024) { $file_size = $filesize . " B"; }
else if($file_size < 1048576) { $file_size = round($file_size / 1024, 2) . " KB"; }
else if($file_size < 1073741824) { $file_size = round($file_size / 1048576, 2) . ' MB'; }
else if ($file_size < 1099511627776) { $file_size = round($file_size / 1073741824, 2) . ' GB'; }
here if the $file_size is in mb or gb i want to cange the size into kb's.
if(strstr($file_size, 'M') || strstr($file_size,'G'))
{
//image is too big so change it to KB's
//need help herererererererererererereereerereererererer!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}