Getting label name of extra user fields

Mentioned Functions:

If you can already get the label BUT it comes with the input, and you are doing this in PHP, then do this:

<?php
    # ...
    # Your code which produces the input + label data into $data
    # ...
    $document = new DOMDocument();
    $document->loadHTML( $data );
    $xpath = new DOMXPath( $document );
    $entries = $xpath->evaluate("//label");
    $results = array();
    foreach( $entries as $entry ) {
        $results[] = '<' . $entry->tagName . '>' . $entry->nodeValue .  '</' . $entry->tagName . '>';
    }
    print_r($results);
?>

This question appears incomplete from my outside perspective, so if this doesn’t solve your problem, please refer to the discussion under the original question (in the comments section) so I may formulate a more appropriate response.