i tried to get specific string from html file, i already get the file name. but i want get piece of string from the different file name. here's the example i was tried.
html
<TABLE class="tab1" border="1" cellpadding="0" cellspacing="0" summary="">
<TR>
<TH align=left colspan=2 bgcolor=#0066CC><H1> Start RIP Job</H1>
</TH>
</TR>
<TR>
<TH align=left> File:
</TH>
<TD class="td1" align=left> WALUYO GROUP (LUTFI) - 240 -
ITHINK\T7\T7-FROZ-45X163 - 20 PCS.tif
</TD>
</TR>
</TABLE>
<TABLE class="tab1" border="1" cellpadding="0" cellspacing="0" summary="">
<TR>
<TH align=left colspan=2 bgcolor=#0066CC><H1> Start RIP Job</H1>
</TH>
</TR>
<TR>
<TH align=left> File:
</TH>
<TD class="td1" align=left> Gigas G - 100x100 - 1x.tif
</TD>
</TR>
</TABLE>
CODE I TRIED,
foreach (glob("C://xampp/htdocs/Log/Flora/*.HTML")as $html1)
{
if (file_exists($html1))
{
$source1 = file_get_contents($html1);
$dom1 = new DOMDocument();
$dom1->loadHTML($source1);
$xpath = new DOMXPath($dom1);
$textList1 = $xpath->query("//table");
foreach ( $textList1 as $text1 )
{
$files = $xpath->evaluate(
"string(descendant::tr[th[contains(text(),'File')]]/td/text())",
$text1);
$threee = $files;
$query = "INSERT INTO CMP.LOG_FILE(FIL_NM) VALUES
('".utf8_decode($threee)."')";
$result = mysql_query($query);
}}}
RESULT :
1. WALUYO GROUP (LUTFI) - 240 - ITHINK\T7\T7-FROZ-45X163 - 20 PCS.tif
2. Gigas G -100x100- 1x.tif
Now i want is just get the size, ex:
1. 45X163
2. 100x100