icklechurch
12-13-2010, 01:26 PM
Hi,
I've not really worked with XML and PHP before and am having what is probably a very simple problem.
I have the following code:
object(SimpleXMLElement)[69]
public 'p' =>
array
0 => string ' SEQ ' (length=5)
1 => string ' BQ? BIWOW ' (length=11)
2 => string ' see amm accunmulafed, ' (length=23)
3 => string ' Scotland will see snow accumulated, ' (length=37)
4 => string ' and whilst we will seek rain ' (length=30)
5 => string ' showers across western Wales and ' (length=34)
6 => string ' England, most is away from the ' (length=32)
7 => string ' coastal fringes and it is a fine ' (length=34)
8 => string ' day. Mainly like winds. ' (length=25)
Which is taken from the following xml doc:
<div xml:lang="en">
<p begin="0.08"> SEQ </p>
<p begin="0.20"> BQ? BIWOW </p>
<p begin="1.84"> see amm accunmulafed, </p>
<p begin="2.84"> Scotland will see snow accumulated, </p>
<p begin="2.84"> and whilst we will seek rain </p>
<p begin="4.16"> showers across western Wales and </p>
<p begin="6.44"> England, most is away from the </p>
How do I get that into a php array where I have the begin value too?
I've tried some tutorials but they make no sense :(
I've not really worked with XML and PHP before and am having what is probably a very simple problem.
I have the following code:
object(SimpleXMLElement)[69]
public 'p' =>
array
0 => string ' SEQ ' (length=5)
1 => string ' BQ? BIWOW ' (length=11)
2 => string ' see amm accunmulafed, ' (length=23)
3 => string ' Scotland will see snow accumulated, ' (length=37)
4 => string ' and whilst we will seek rain ' (length=30)
5 => string ' showers across western Wales and ' (length=34)
6 => string ' England, most is away from the ' (length=32)
7 => string ' coastal fringes and it is a fine ' (length=34)
8 => string ' day. Mainly like winds. ' (length=25)
Which is taken from the following xml doc:
<div xml:lang="en">
<p begin="0.08"> SEQ </p>
<p begin="0.20"> BQ? BIWOW </p>
<p begin="1.84"> see amm accunmulafed, </p>
<p begin="2.84"> Scotland will see snow accumulated, </p>
<p begin="2.84"> and whilst we will seek rain </p>
<p begin="4.16"> showers across western Wales and </p>
<p begin="6.44"> England, most is away from the </p>
How do I get that into a php array where I have the begin value too?
I've tried some tutorials but they make no sense :(