<?
$string =\"<table><tr><td>aaa</td><td>bbb</td><td>ccc</td><td>ddd</td></tr><tr><td>aaa1</td><td>bbb1</td><td>ccc1</td><td>ddd1</td></tr></table>\";
$string = stristr($string,\"<table>\");
$string = substr($string,7);
$pos = strpos($string,\"</table>\");
$string = substr($string,0,$pos);
$arr = explode(\"<td>\",$string);
print_r($arr);
?>
The above code tries to capture the content in the table data i.e. <td>...</td>. That is fine, now my question is how to read a file in and perform the same operation on it. Assume that the file contains only one table. Now how do i get whole file into $string?