select('hosts', '*', "IP LIKE '192.168.".$i."%' ORDER BY IP"); while ($Row = $DbResult->fetch_array()) { $Data = $Row['name']; if (strlen($Data) < 9) $Data .= "\t"; fputs($File, " host ".$Data."\t{ fixed-address ".$Row['IP'].";\thardware ethernet ".$Row['MAC']."; }\n"); } fputs($File, "}\n\n"); } fclose($File); */