0) { while($selectRow =mysql_fetch_assoc($selectRes)) { // do nothing //$ipArray[$i] = $selectRow['ip']; //$i++; $string .= "\nDeny from " . $selectRow['ip']; } // Open the file to get existing content //$current = file_get_contents($file); // Append a new person to the file // Write the contents back to the file } else { // do nothing } file_put_contents($file, $string); } ?>