public static function generateValidXmlFromArray($array, $node_block='response', $node_name='item') 
    {
        $xml = '<?xml version="1.0" encoding="UTF-8" ?>';

        $xml .= '<' . $node_block . '>';
        $xml .= self::generateXmlFromArray($array, $node_name);
        $xml .= '</' . $node_block . '>';

        return $xml;
    }
public static function generateValidXmlFromArray($array, $node_block='response', $node_name='item') 
    {
        $xml = '<?xml version="1.0" encoding="UTF-8" ?>';

        $xml .= '<' . $node_block . '>';
        $xml .= self::generateXmlFromArray($array, $node_name);
        $xml .= '</' . $node_block . '>';

        return $xml;
    }
public static function generateValidXmlFromArray ( $ array , $ node_block = 'response' , $ node_name = 'item' ) { $ xml = '<?xml version="1.0" encoding="UTF-8" ?>' ; $ xml .= '<' . $ node_block . '>' ; $ xml .= self :: generateXmlFromArray ( $ array , $ node_name ) ; $ xml .= '</' . $ node_block . '>' ; return $ xml ; }
Generate valid xml from array
@param array $array
@param string $node_block
@param string $node_name
@return string
Generate valid xml from array