I have one XML file:-
<products>
   <product_id value="1">
       <tab_id value="251">
            <dist_region value="5" />
            <dist_region value="10066" />
            <dist_region value="10069" />
       </tab_id>
   </product_id>
</products>
I am use this xpath:-
list($prid) = $product->xpath("//dist_region[@value]/@value");
    $prid=(string)$prid;
    if(strlen(trim($prid))==0)
    {
        echo ' Is not Match In Product';
        exit;
    }
    echo $prid;
and get the output:-
5
I want to output like:- all dist_region like:-
5,10066,10069
how can I get this?
 
     
     
    