if (in_array($a, $MIOARRAY)) e non if (in_array($a, $MIOARRAY()))

Poi vedrai se ci sono altri errori.