私のセットアップ:
index.php:
<?php
$page = file_get_contents('a.html');
$arr = array();
preg_match('/<td class=\"myclass\">(.*)\<\/td>/s',$page,$arr);
print_r($arr);
?>
a.html:
...other content
<td class="myclass">
THE
CONTENT
</td>
other content...
出力:
Array
(
[0] => Array
(
)
)
index.php の 4 行目を次のように変更すると:
preg_match('/<td class=\"myclass\">(.*)\<\/t/s',$page,$arr);
出力は次のとおりです。
Array
(
[0] => <td class="myclass">
THE
CONTENT
</t
[1] =>
THE
CONTENT
)