bobbiedigital
Programmer
Hi
im writing an edit table function for an rte, the rte before i started work on it inserted tables but it didnt have any functionality for editing table features such as border thickness etc, ive made it so the tables have a unique identifier when inserted into the rte, its only a number, i.e. name="1", im also using php, and what i wish to do is retrieve the table properties between the two table tags, here is the table code.
<table name="1" style="" 662px="" 56px="" border="1" cellpadding="4" cellspacing="0" height=""><tbody><tr><td style="" 1px="" dotted="" rgb(153="" 153=""> </td><td style="" 1px="" dotted="" rgb(153="" 153=""> </td></tr><tr><td style="" 1px="" dotted="" rgb(153="" 153=""> </td><td style="" 1px="" dotted="" rgb(153="" 153=""> </td></tr></tbody></table>
<br>
<table name="2" border="1" cellpadding="4" cellspacing="0" width="100%"><tbody><tr><td style="" 1px="" dotted="" rgb(153="" 153=""> </td><td style="" 1px="" dotted="" rgb(153="" 153=""> </td></tr><tr><td style="" 1px="" dotted="" rgb(153="" 153=""> </td><td style="" 1px="" dotted="" rgb(153="" 153=""> </td></tr></tbody></table>
im thinking i might need to create a regular expression and place the contents into an array.
one thing is im terrible with regular expressions!, another way i thought i could do it is by breaking up the <table>...</table> into strings, and then use substrings, what id have to do is limit, table names and border widths and cellspacing etc to only two digits, i dont see why people would want to go greater than single digits, then pass the values into an array.
Would any body be able to suggest any better methods??
Cheers for your help
Bobbie
im writing an edit table function for an rte, the rte before i started work on it inserted tables but it didnt have any functionality for editing table features such as border thickness etc, ive made it so the tables have a unique identifier when inserted into the rte, its only a number, i.e. name="1", im also using php, and what i wish to do is retrieve the table properties between the two table tags, here is the table code.
<table name="1" style="" 662px="" 56px="" border="1" cellpadding="4" cellspacing="0" height=""><tbody><tr><td style="" 1px="" dotted="" rgb(153="" 153=""> </td><td style="" 1px="" dotted="" rgb(153="" 153=""> </td></tr><tr><td style="" 1px="" dotted="" rgb(153="" 153=""> </td><td style="" 1px="" dotted="" rgb(153="" 153=""> </td></tr></tbody></table>
<br>
<table name="2" border="1" cellpadding="4" cellspacing="0" width="100%"><tbody><tr><td style="" 1px="" dotted="" rgb(153="" 153=""> </td><td style="" 1px="" dotted="" rgb(153="" 153=""> </td></tr><tr><td style="" 1px="" dotted="" rgb(153="" 153=""> </td><td style="" 1px="" dotted="" rgb(153="" 153=""> </td></tr></tbody></table>
im thinking i might need to create a regular expression and place the contents into an array.
one thing is im terrible with regular expressions!, another way i thought i could do it is by breaking up the <table>...</table> into strings, and then use substrings, what id have to do is limit, table names and border widths and cellspacing etc to only two digits, i dont see why people would want to go greater than single digits, then pass the values into an array.
Would any body be able to suggest any better methods??
Cheers for your help
Bobbie