#takes the first two characters and stores them for later $AddressOriginal = substr($Address, 0, 3); #removes the first three characters leaving the later ## in the format ##:## $Address = substr($Address, 3, 2); #Test lines to make sure the above lines do their intended purpose #print $Address . "\n"; #print $AddressOriginal . "\n"; for($count = 1; $count <= $IDcount; $count++) { $hexval = sprintf("%02X\n", ($Address)); $Address++; $Address1 = ($AddressOriginal . $hexval); #Test line to make sure the procedure completed its intended task print $Address1;