Option doesn’t save

An option is a meta information saved in the database as a string. An array is a memory specific variable that has its own characteristics.

But to every problem there is a workaround:

$myoption = json_encode($the_array();
add_option('myoption', $myoption, '', 'yes');

Now to fetch it:

$myoption = json_decode(get_option('myoption'));

Voila.

When saving the option I converting to a json string format so that it fits the database table field specification and when I extract it I convert it back from json to an array.