- <?
- $t = <<<eof
- <table id="test">
- <tr>
- <td>1</td>
- <td>2</td>
- </tr>
- <tr>
- <td>3</td>
- <td>4</td>
- </tr>
- </table>
- eof;
- preg_match_all('#<table.*</table>#is', $t, $l);
- preg_match_all('#<table(.*)?>.*</table>#is', $t, $m);
- preg_match_all('#<table>.*</table>#is', $t, $n);
- header('Content-Type: text/plain');
- print_r($l);
- print_r($m);
- print_r($n);
Undefined
By: Guest | Date: May 30 2010 17:49 | Format: None | Expires: never | Size: 394 B | Hits: 872
Latest pastes
1 days ago
3 days ago
3 days ago
4 days ago
5 days ago