protected function _filterAnswersOnly($sourceSurveyId, array $answers)
    {
        $s = $sourceSurveyId . 'X';
        $l = strlen($s);

        $results = array();
        foreach ($answers as $key => $value) {
            if (substr($key, 0, $l) == $s) {
                $results[$key] = $value;
            }
        }

        return $results;
    }
protected function _filterAnswersOnly($sourceSurveyId, array $answers)
    {
        $s = $sourceSurveyId . 'X';
        $l = strlen($s);

        $results = array();
        foreach ($answers as $key => $value) {
            if (substr($key, 0, $l) == $s) {
                $results[$key] = $value;
            }
        }

        return $results;
    }
protected function _filterAnswersOnly ( $ sourceSurveyId , array $ answers ) { $ s = $ sourceSurveyId . 'X' ; $ l = strlen ( $ s ) ; $ results = array ( ) ; foreach ( $ answers as $ key => $ value ) { if ( substr ( $ key , 0 , $ l ) == $ s ) { $ results [ $ key ] = $ value ; } } return $ results ; }
Filters an answers array, return only those fields that where answered by the user.

@param int $sourceSurveyId Survey ID
@param array $answers
@return array
Filters an answers array return only those fields that where answered by the user .