some thing like that
function convert_size($from,$to,$unit){
some code...
return $calculated_value
}
echo convert_size("YB","KB",50);
- Byte (B)
- Kilobyte (KB)
- Megabyte (MB)
- Gigabyte (GB)
- Terabyte (TB)
- Petabyte (PB)
- Exabyte (EB)
- Zettabyte (ZB)
- Yottabyte (YB)