HTML Table class? |
[eluser]InsiteFX[/eluser]
Code: // This sets up a table template. CodeIgniter HTML Table InsiteFX
[eluser]tonanbarbarian[/eluser]
what i suspect is happening is that the table class is caching the output so that the first time it displays the table the second time it display the table again but this time the data in the table is the original copy of the data plus the new copy of the data that is sort of born out by the way you show the output was created on the link you gave you had the following title row 'Name', 'Color', 'Size' normal row 'Fred', 'Blue', 'Small' normal row 'Mary', 'Red', 'Large' normal row 'John', 'Green', 'Medium' title row 'Name', 'Color', 'Size' normal row 'Fred', 'Blue', 'Small' normal row 'Mary', 'Red', 'Large' normal row 'John', 'Green', 'Medium' normal 'Name', 'Color', 'Size' normal row 'Fred', 'Blue', 'Small' normal row 'Mary', 'Red', 'Large' normal row 'John', 'Green', 'Medium' so the first 4 rows of the table, one title row and 3 data rows was the call made in the constructor then the next 8 rows, one title row and 7 normal rows, was the concatenated data in the second run the table code by default makes the first row of data a title row and all the rest as normal rows
[eluser]anna16[/eluser]
@tonanbarbarian thanks for the explanation. Actually i wanted to incorporate the codes made by insiteFX can you teach me how do i incorporate insiteFX table codes with the output data? Thanks again in advanced.
[eluser]tonanbarbarian[/eluser]
now that you have removed the extra call to the sample1 method the code insiteFX has provided should run fine
[eluser]InsiteFX[/eluser]
If you need to change the table data you need to do this! Code: $this->table->clear(); Then reload your table data array. InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |