The problem here is that you don’t allow PHP to read more than one value, because all values use the same name site_options[categorychoice]
, so they overwrite each other, and the last one wins.
You need more brackets. Set the name
attribute of your select
element to site_options[categorychoice][]
, and all values will be read by PHP.