Подскажите,есть xml
[CODE][operations] => SimpleXMLElement Object (
[date] => Array
(
[0] => 26 мая 2015, в 12:22
[1] => 26 мая 2015, в 12:22
)
[dateiso] => Array
(
[0] => 2015-05-26T11:22:00.000+03:00
[1] => 2015-05-26T11:22:00.000+03:00
)
[timestamp] => Array
(
[0] => 1432628520
[1] => 1432628520
)
[address] => Array
(
[0] => SimpleXMLElement Object
(
[index] => 115432
[description] => Москва 432
)
[1] => SimpleXMLElement Object
(
[index] => 115432
[description] => Москва 432
)
)
[operation] => Array
(
[0] => SimpleXMLElement Object
(
[id] => 1
[name] => Приём
)
[1] => SimpleXMLElement Object
(
[id] => 8
[name] => Обработка
)
)[/CODE]вывожу информацию
[CODE]foreach($arr->msg->operations as $operations)
{
$operation = $operations->operation->name;
$index = $operations->address->index;
$description = $operations->address->description;
$attr = $operations->attr->name;
$date = $operations->date;
}
echo $operation;
echo $index;
echo $attr;
echo $date;[/CODE]выводит только первое значение, следующее не выводит (((
подскажите как правильно сделать, чтоб выводил весь список
[CODE][operations] => SimpleXMLElement Object (
[date] => Array
(
[0] => 26 мая 2015, в 12:22
[1] => 26 мая 2015, в 12:22
)
[dateiso] => Array
(
[0] => 2015-05-26T11:22:00.000+03:00
[1] => 2015-05-26T11:22:00.000+03:00
)
[timestamp] => Array
(
[0] => 1432628520
[1] => 1432628520
)
[address] => Array
(
[0] => SimpleXMLElement Object
(
[index] => 115432
[description] => Москва 432
)
[1] => SimpleXMLElement Object
(
[index] => 115432
[description] => Москва 432
)
)
[operation] => Array
(
[0] => SimpleXMLElement Object
(
[id] => 1
[name] => Приём
)
[1] => SimpleXMLElement Object
(
[id] => 8
[name] => Обработка
)
)[/CODE]вывожу информацию
[CODE]foreach($arr->msg->operations as $operations)
{
$operation = $operations->operation->name;
$index = $operations->address->index;
$description = $operations->address->description;
$attr = $operations->attr->name;
$date = $operations->date;
}
echo $operation;
echo $index;
echo $attr;
echo $date;[/CODE]выводит только первое значение, следующее не выводит (((
подскажите как правильно сделать, чтоб выводил весь список