After extracting data from a file in php with xpath.

My code: 

```
$xml = simplexml_load_file("CCV.xml");

    foreach ($xml->xpath('./section[@label="Education"]/section[@label="Degrees"]') as $details) {
            foreach ($details->field as $f) {
            $a = $f->attributes();
                if ('Degree Type'== $a['label']){
                    $x = $f->lov;
                    var_dump($x);
                    break;
                }
            }
    }

```

The result looks like this

```
object(SimpleXMLElement)[10]
  public '@attributes' => 
    array (size=1)
      'id' => string '00000000000000000000000000000073' (length=32)
  public 0 => string 'Doctorate' (length=9)
object(SimpleXMLElement)[9]
  public '@attributes' => 
    array (size=1)
      'id' => string '00000000000000000000000000000072' (length=32)
  public 0 => string 'Master's Thesis' (length=15)
object(SimpleXMLElement)[8]
  public '@attributes' => 
    array (size=1)
      'id' => string '00000000000000000000000000000084' (length=32)
  public 0 => string 'Bachelor's Equivalent' (length=21) 

```

How can I return only the first object with **Doctorate**.