<?php
$html = file_get_contents("https://www.casa.gov.au/rpa-operator-certificate-holders");
$pokemon_doc = new DOMDocument();
libxml_use_internal_errors(TRUE);
if(!empty($html)){
$pokemon_doc->loadHTML($html);
libxml_clear_errors();
$pokemon_xpath = new DOMXPath($pokemon_doc);
$pokemon_row = $pokemon_xpath->query('//tr');
if($pokemon_row->length > 0){
$s4 = "4 ONE 4 REAL ESTATE PTY LTD ";
$s5 = ($pokemon_row[2]->firstChild->nodeValue);
echo strcmp($s4,$s5);
}
}
?>
From the above code I am trying to compare string from the table of this site("https://www.casa.gov.au/rpa-operator-certificate-holders") but I didn't get output as 0 when I am using strcmp(), instead I am getting output as -1