开发者

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', ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜