How to insert variable which contain array value in wp_options table?

You could also use json_encode() function instead of serialize.

$var = json_encode($array);
update_option('option_name', $var); 

error code: 523