I'm taking a guess here that what you want to do is convert a given number of bytes to kilobytes, megabytes, gigabytes, and whatever "rb" is. If so, you could do it like this (assuming each is 1024 of the previous):
$bytes = 128297394;
$units = array('b', 'kb', 'mb', 'gb', 'rb');
foreach ($units as $key => $val) {
$size = $bytes / pow(1024, $key);
echo $size . ' ' . $val . '<br />';
}