R
Rafal 'Raf256' Maj
Hi,
I have data like:
<?xml version="1.0" encoding="ISO-8859-2"?>
<news>
<post>
<date>10.04.2004</date>
<text>Test test test</text>
</post>
<post>
<date>15.04.2004</date>
<text>Bleh bleh bleh <a href="www.test">test</a></text>
</post>
</news>
and I want to have it in PHP as array looking like:
array(
[0] =>
array(
date => "10.04.2004"
text => "Test test test"
)
[1] =>
array (
date => "15.04.2004"
text => "Bleh bleh bleh <a href="www.test">test</a>"
)
)
problem - text can have some HTML tags, so I want to just have it all in
string.
How can I do this in PHP if I have XML data in some data.xml ?
I have data like:
<?xml version="1.0" encoding="ISO-8859-2"?>
<news>
<post>
<date>10.04.2004</date>
<text>Test test test</text>
</post>
<post>
<date>15.04.2004</date>
<text>Bleh bleh bleh <a href="www.test">test</a></text>
</post>
</news>
and I want to have it in PHP as array looking like:
array(
[0] =>
array(
date => "10.04.2004"
text => "Test test test"
)
[1] =>
array (
date => "15.04.2004"
text => "Bleh bleh bleh <a href="www.test">test</a>"
)
)
problem - text can have some HTML tags, so I want to just have it all in
string.
How can I do this in PHP if I have XML data in some data.xml ?