public static function arrayToXml($arr, $num_prefix = "num_") : string
    {
        if (!is_array($arr)) return $arr;
        $result = '';
        foreach ($arr as $key => $val) {
            $key = (is_numeric($key) ? $num_prefix . $key : $key);

            $result .= '<' . $key . '>' . self::arrayToXml($val, $num_prefix) . '</' . $key . '>';
        }
        return $result;
    }
public static function arrayToXml($arr, $num_prefix = "num_") : string
    {
        if (!is_array($arr)) return $arr;
        $result = '';
        foreach ($arr as $key => $val) {
            $key = (is_numeric($key) ? $num_prefix . $key : $key);

            $result .= '<' . $key . '>' . self::arrayToXml($val, $num_prefix) . '</' . $key . '>';
        }
        return $result;
    }
public static function arrayToXml ( $ arr , $ num_prefix = "num_" ) : string { if ( ! is_array ( $ arr ) ) return $ arr ; $ result = '' ; foreach ( $ arr as $ key => $ val ) { $ key = ( is_numeric ( $ key ) ? $ num_prefix . $ key : $ key ) ; $ result .= '<' . $ key . '>' . self :: arrayToXml ( $ val , $ num_prefix ) . '</' . $ key . '>' ; } return $ result ; }
convert data from array to xml

@param $arr
@param string $num_prefix
@return string
convert data from array to xml