I am having problems with preg_match_all spanning over newlines.
Using /m does not seem to ignore the the newlines.

// This works
// Both contents inside <td> and </td> are found
$html = '<tr valign="top">
<td width="10">One cell</td>
<td>Another</td>
</tr>';

// This does not
// Only the contents inside the first <td> and </td> are found
// The only difference is that there is a linebreak efter the second <td>
$html = '<tr valign="top">
<td width="10">One cell</td>
<td>
Another</td>
</tr>';

preg_match_all("/<td.*>(.*)<\/td>/m", $html, $out);

I have been doing this before, but I can't remember how I got it working...
Any thougts?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to