preg_match_all no results
preg_match_all('|<tr>(.*?)</tr>|', '<table>
<tr>
<td>oo</td>
</开发者_Python百科tr>
<tr>
<td>ddd</td>
</tr>
</table>', $matches, PREG_PATTERN_ORDER);
why this doesn't show any results. I want to get second match $matches[1][2]
You need to use the s pattern modifier
preg_match_all('|<tr>(.*?)</tr>|s', ...
精彩评论