Forum Moderators: coopster
while ($data = read()) {
$word = substr($data, 0, 4); // Gobble the 4-character words.
$lowOrder = hexdec(substr($word,0, 2)); // Split them in two.
$highOrder = hexdec(substr($word, 2, 2)) * 256; // Calculate the separate values
$value = $highOrder + $lowOrder; // Combine them to get the final result
saveResult();
} // end while