i have read an xml file but it returns like this
Array
(
[0] => Array
(
[0] => SimpleXMLElement Object
(
[0] => 94351
)
)
[1] => Array
(
[0] => SimpleXMLElement Object
(
[0] => 94351
)
)
)
this is the code i have writen to read from the xml file
$root = new SimpleXMLElement($xml);
$cart = array();
foreach ($root->Docs as $Docs) {
$x = $Docs;
$cart[] = array($x);
}
}
but i want my array to look like this failing to get bellow result. im not getting the bellow result. reason i want bellow result is to compare this array to another array
Array
(
[0] => Array
(
[0] => 94351
)
[1] => Array
(
[0] => 94352
)
)