I want to capture the data with the title "Groom Name" in Label, that is, I want to print the "printyazdırasd" output on the screen. How can I get the value inside the label according to the title? With the code below, I print the title of the label on the screen. In other words, I have printed "Damat Adi" on the screen. I want to print the text. I want to print the text according to the title.
HTML TAG
<label .... title="Damat Adi">yazdıryazdırasd</label>
PHP
$sql = "SELECT html_kod from ...";
$stmt = sqlsrv_query( $conn, $sql );
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
$paketKFIYAT = $row['html_kod'];
libxml_use_internal_errors(true);
$dom = new DOMDocument();
$dom->loadHTML($paketKFIYAT);
$iFrame = $dom->getElementsByTagName('label')->item(0);
$src = $iFrame->getAttribute('title');
$results = Array("tag" => $src);
echo json_encode($results);
}