cosmicsea
01-24-2010, 07:18 PM
Hi im using this code to automatically convert KB into MB
<?php
$size = $data['size'];
$size = preg_replace("#[a-z]#i", '', $size);
$size = round($size/1024);
echo $size.'MB';
?>
I want to make it so when no KB is available for it to be blank. right now when no KB is available it prints 0MB and i want that hidden. can someone help me? Thanks.
<?php
$size = $data['size'];
$size = preg_replace("#[a-z]#i", '', $size);
$size = round($size/1024);
echo $size.'MB';
?>
I want to make it so when no KB is available for it to be blank. right now when no KB is available it prints 0MB and i want that hidden. can someone help me? Thanks.