If you're looking to parse the HTML code you have, you can do that with several server-side scripting languages and also with JavaScript.
Here's a solution with JS:
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript">
function loadPage(href){
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", href, false);
xmlhttp.send();
return xmlhttp.responseText;
}
function parseHTML(url){
var my_arr = [];
var el = document.createElement( 'div' );
el.innerHTML = loadPage(url);
var table_row = el.document.getElementsByClassName("a");
for(var i=0; i<x.length; i++){
var new_arr = new Array();
my_arr.push(new_arr);
var r = x[i].getElementsByTagName('td');
for(var j=0; j<r.length; j++){
var new_val = r[j].innerHTML;
my_arr[i].push(new_val);
}
}
return my_arr;
}
</script>
</head>
<body onload="parseHTML('my_url_path');">
</body>
</html>
Here's a solution with PHP and SimpleHTMLDOM:
<?php
$str = '<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"><tr><th>Files</th><th>Errors</th></tr><tr class="a"><td>225</td><td>2294</td></tr></table>';
$html = new simple_html_dom();
// Load from a string
$html->load($str);
$arr = array();
$iterator = 0;
// Loop over all the <tr> with a class ".a"
$table_rows = $html->find("tr.a");
foreach($table_rows as $tr){
$arr[$iterator] = array();
// Loop over all the <td> inside a <tr> with a class ".a"
$table_divisions = $tr->find("td");
foreach($table_divisions as $td){
$arr[$iterator][] = $td->innertext;
}
$iterator++;
}
?>
You need to download the library:
http://simplehtmldom.sourceforge.net/manual.htm
http://sourceforge.net/projects/simplehtmldom/files/
Keep in mind that you need PHP 5.0+