I have the following xml content :

```
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
   <params>
      <param>
         <value>
            <array>
               <data>
                  <value>
                     <array>
                        <data>
                           <value>
                              <string>Car</string>
                           </value>
                           <value>
                              <string>1</string>
                           </value>
                        </data>
                     </array>
                  </value>
                  <value>
                     <array>
                        <data>
                           <value>
                              <string>Plane</string>
                           </value>
                           <value>
                              <string>2</string>
                           </value>
                        </data>
                     </array>
                  </value>
                  <value>
                     <array>
                        <data>
                           <value>
                              <string>Boat</string>
                           </value>
                           <value>
                              <string>3</string>
                           </value>
                        </data>
                     </array>
                  </value>
               </data>
            </array>
         </value>
      </param>
   </params>
</methodResponse>

```

I would like to retreive the number `3` only knowing the data `Boat`

Here is what I have done :

```
$xml = new SimpleXMLElement($response);
$arr_response = $xml->params->param->value->array->data->value->array->data;
foreach ($arr_response as $key => $value) {
    if($key == "Boat"){
        echo "Found !";
        echo "$key -> $value";
    }else{
        echo "Not found";
    }
}

```

Output :

```
Not found

```