PHP xpath - find element with a value and also get elements before and after element

后端 未结 1 1710
傲寒
傲寒 2020-12-09 22:58

Lets say I have this XML:


    
        images/thumbs/002.jpg
        002

        
相关标签:
1条回答
  • Use this:

    $project = $xml_object->xpath("//photo[filename='$image_id']");
    
    0 讨论(0)
提交回复
热议问题