Select Elements Which Have A Certain Attribute Value with simplexml

I have this result when i do var_dump to $xml

`object(SimpleXMLElement)[257] public '@attributes' => array (size=1) 'seq' => string '290' (length=3) public 'FIN' => object(SimpleXMLElement)[256] public '@attributes' => array (size=1) 'seq' => string '261' (length=3) public 'VAL' => string '1' (length=1) public 'ATT' => array (size=11) 0 => object(SimpleXMLElement)[255]`

i need select with simplexml which seq have value 29

Thanks in advance

--------------Solutions-------------

You can use xpath to find element with attribute 'seq' equal 29. Suppouse, $xml contains simplexml object then

$element = $xml->xpath('//*[@seq=29]');

Category:php Time:2018-11-30 Views:1

Related post

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 4.004 (s). 15 q(s)