I am passing a table like so in a textbox:
<TABLE ALIGN='left' BORDER='1'>
<TR VALIGN='middle' ALIGN='left'>
<TD>111</TD>
<TD>222</TD>
</TR>
<TR VALIGN='middle' ALIGN='left'>
<TD>333</TD>
<TD>444</TD>
</TR>
</TABLE>
I then want to display this table - but since ther is other information in the form, I want to convert all carriage returns to break tags (nl2br). So once that is done, the html returned looks something like:
<TABLE ALIGN='left' BORDER='1'>
<BR>
<TR VALIGN='middle' ALIGN='left'>
<BR>
<TD>111</TD>
<BR>
<TD>222</TD>
<BR>
</TR>
<BR>
<TR VALIGN='middle' ALIGN='left'>
<BR>
<TD>333</TD>
<BR>
<TD>444</TD>
<BR>
</TR>
<BR>
</TABLE>
<BR>
I can get rid of the break tags following any of the colsing tags - but how can I get rid of the items following the opening tags )(TR AND TABLE) ? I know it has to do w/ regular expressions. But I went over the tutorials and am still stumped. could anyone post the code that looks for a TR tag followed by a carriage return and a <BR> and replaces it with just the TR tag minus the BR and carriage return?
Thanks a lot.