protected function _parseData($data)
    {
        $output = array('title' => '','body' => '');
        $matches = array();

        if (preg_match_all('#<data name="([^"]+)">(.*?)<\/data>#si', $data, $matches)) {
            $attributes = $matches[1];
            $contents = $matches[2];

            foreach ($attributes as $i => $attribute) {
                $output[$attribute] = $contents[$i];
            }
        }

        return $output;
    }
protected function _parseData($data)
    {
        $output = array('title' => '','body' => '');
        $matches = array();

        if (preg_match_all('#<data name="([^"]+)">(.*?)<\/data>#si', $data, $matches)) {
            $attributes = $matches[1];
            $contents = $matches[2];

            foreach ($attributes as $i => $attribute) {
                $output[$attribute] = $contents[$i];
            }
        }

        return $output;
    }
protected function _parseData ( $ data ) { $ output = array ( 'title' => '' , 'body' => '' ) ; $ matches = array ( ) ; if ( preg_match_all ( '#<data name="([^"]+)">(.*?)<\/data>#si' , $ data , $ matches ) ) { $ attributes = $ matches [ 1 ] ; $ contents = $ matches [ 2 ] ; foreach ( $ attributes as $ i => $ attribute ) { $ output [ $ attribute ] = $ contents [ $ i ] ; } } return $ output ; }
Parse the title,body from data.

@param string $data

@return array
Parse the title body from data .