PHP – How to change the value of a child node in a DOM object
Using the getElementsByTagName method to navigate and find the child in question. $number_orders = $image_1->getElementsByTagName(‘number_order’); foreach ($number_orders as $key => $value) { $value->nodeValue = “teaser”; }