Welcome Guest, Not a member yet? Register   Sign In
xml_from_result and unserialize
#1

[eluser]NiconPhantom[/eluser]
Hi guys,

I plan to use something like

$this->load->dbutil();

$query3 = $this->front_menu->get_menu();
$config = array (
'root' => 'root',
'element' => 'element',
'newline' => "\n",
'tab' => "\t"
);

echo $this->dbutil->xml_from_result($query3, $config);

But my problem is that header row of query3 is serialized array. Is it possible to unserialize data for correct xml output? is it possible to use only header row in xml output?

At this time my output is:

<element>
<id>971</id>
<pid>0</pid>
<order>971</order>
<position>left</position>
&lt;header&gt;a:4:{s:2:&quot;et&quot;;s:3:&quot;Muu&quot;;s:2:&quot;en&quot;;s:5:&quot;Other&quot;;s:2:&quot;ru&quot;;s:12:&quot;Другое&quot;;s:2:&quot;fi&quot;;s:4:&quot;Muut&quot;;}&lt;/header&gt;
<status>enabled</status>
<activation>1297548000</activation>
</element>

Thank you in advance,




Theme © iAndrew 2016 - Forum software by © MyBB