goni
goni

Reputation: 53

preg_match_all no results

    preg_match_all('|<tr>(.*?)</tr>|', '<table>
<tr>
<td>oo</td>
</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]

Upvotes: 0

Views: 391

Answers (1)

user775263
user775263

Reputation: 246

You need to use the s pattern modifier

preg_match_all('|<tr>(.*?)</tr>|s', ...

Upvotes: 4

Related Questions