I have several identical elements with different attributes that I'm accessing with SimpleXML:
I need to remove a specific seg element, with an id of "A12", how can I do this? I've tried looping through the seg elements and unsetting the specific one, but this doesn't work, the elements remain.
foreach($doc->seg as $seg)
if($seg['id'] == 'A12')