JustinMs66
07-12-2007, 09:12 PM
i really do not understand this.
this should be extremely simple yet it is not working...
i have this text:
$text = '
<td>
<%test1%>
<%test2%>
</td>
<td>
<%test3%>
<%test4%>
<%test5%>
</td>
';
and i want to split it into two arrays. both the contents of the insides of the <td></td>.
patterns i have tried:
$pattern = "/<td>(.*)<\/td>/";
$pattern = "/\<td\>(.*)\<\/td\>/";
and then:
preg_match_all($pattern,$text,$return);
var_dump($return);
and that will always return an empty array... i dont understand why.
this should be extremely simple yet it is not working...
i have this text:
$text = '
<td>
<%test1%>
<%test2%>
</td>
<td>
<%test3%>
<%test4%>
<%test5%>
</td>
';
and i want to split it into two arrays. both the contents of the insides of the <td></td>.
patterns i have tried:
$pattern = "/<td>(.*)<\/td>/";
$pattern = "/\<td\>(.*)\<\/td\>/";
and then:
preg_match_all($pattern,$text,$return);
var_dump($return);
and that will always return an empty array... i dont understand why.