I have an xml which is something like
<Row>
<RowType>Header</RowType>
<Cells>
<Cell />
<Cell>
<Value>31 Jan 11</Value>
</Cell>
</Cells>
</Row>
<Row>
<RowType>Section</RowType>
<Title>Salary</Title>
<Rows>
<Row>
<RowType>Row</RowType>
<Cells>
<Cell>
<Value>Total</Value>
and keeps going on
I need to get the date value 31 Jan 11 as a variable so that I could use it later for my sql insert query.
Could somebody help me on how to get the date value from the xml into a variable.
Thanks
if you only need to retrieve this value of the xml file:
$Row = new SimpleXMLElement($xmlstr_file);
echo $Row->Cells[0]->Cell[1]->value;
Else I suggest you to check http://www.php.net/manual/fr/simplexml.examples-basic.php
If you only need to retrieve this value of the file:
$Row = new SimpleXMLElement($xmlstr_file);
echo $Row->Cells[0]->Cell[1]->value;