protected function explode_answer($answer) {
        if (!$answer) {
            return array();
        }
        $bits = explode(',', $answer);
        $selections = array();
        foreach ($bits as $bit) {
            list($stem, $choice) = explode('-', $bit);
            $selections[$stem] = $choice;
        }
        return $selections;
    }
protected function explode_answer($answer) {
        if (!$answer) {
            return array();
        }
        $bits = explode(',', $answer);
        $selections = array();
        foreach ($bits as $bit) {
            list($stem, $choice) = explode('-', $bit);
            $selections[$stem] = $choice;
        }
        return $selections;
    }
protected function explode_answer ( $ answer ) { if ( ! $ answer ) { return array ( ) ; } $ bits = explode ( ',' , $ answer ) ; $ selections = array ( ) ; foreach ( $ bits as $ bit ) { list ( $ stem , $ choice ) = explode ( '-' , $ bit ) ; $ selections [ $ stem ] = $ choice ; } return $ selections ; }
Explode the answer saved as a string in state

@param string $answer comma separated list of dash separated pairs
@return array
Explode the answer saved as a string in state