illegal offset in option add

The array is ‘hidden’ inside the form elements.
Their respective name/ID is like MY_option_name[some_other_name]. That is the array structure.

// Edit (to elaborate a little on that)

Suppose you have the following form:

<form action="options.php" method="post">
    Font:<br />
    <input type="text" name="MY_options[font]" id="MY_options[font]" />
    Color:<br />
    <input type="text" name="MY_options[color]" id="MY_options[color]" />
    <?php submit_button(); ?>
</form>

If you submit the form, it will do the same as the following:

$my_options = array(
    'font' => YOUR_FONT_INPUT,
    'color' => YOUR_COLOR_INPUT,
);
update_option('MY_options', $my_options);

BUT – every option declared and set before will be unset and thus deleted if you do not incorporate its current value into your form! So be sure to first read the options and store the ones you don’t want to update (but still want to keep!) inside hidden input fields within the form. Like so:

foreach (get_option('MY_options') as $option_name => $option_value) {
    switch ($option_name) {
        case 'font':
        case 'color':
            break;
        default:
            echo '<input type="hidden" name="'.$option_name.'" value="'.$option_value.'" />";
    }
}