1
I have a array
and with it I make a table with data comparison, this table gets very big (it has to roll a lot the scroll
mouse) and on the right side of the screen is blank.
Script:
reset($quebra);
while (key( $quebra) !== null) {
// print("Numero do Array".key($quebra)."-- Resultado do Array ".current($quebra))."<br>\r\n";
$row = explode (" " , key($quebra) . "=" . current($quebra));
$posicao3 = strpos($row[0], '=');
if (isset($ocupados[substr($row[0],$posicao3+1,4)]))
$dadosweb .= "<tr ><td bgcolor=#FF0000>".substr($row[0],$posicao3+1,4)."</td><td >".$row[20]."</td>";
else
$dadosweb .= "<tr><td >".substr($row[0],$posicao3+1,4)."</td><td >".$row[20]."</td>";
$dadosweb .= "<td ></td><td ></td></tr>";
next($quebra);
}
Question
How can I divide this table to better occupy the page ?
What do you mean "break the table"?
– Guilherme Oderdenge
Shows the structure of your array, and if possible post a link as it is being done.
– paulomartinhago
I took advantage of the edition of @lost and improved a little the information in the question. However, to better understand what is asked, you should elaborate the problem, put the cycle that is preparing HTML, but you want that cycle to process only half of the records found? Is that it? And the other half goes somewhere else? Note: A screenshot of the result you are getting and a description of what you would like to stay can go a long way in understanding your goal.
– Zuul
Maybe you can add:
<p>
next to the<tr>
, and thus create another table with the<td>
, I don’t know if that’s what you want to do.– Mega
Please follow the link, https://lh3.googleusercontent.com/-zvM49q_2L-E/UupD-Boymq/AAAAAAAAAAcAAAAAAA/POLyRXRhbYY/w894-h503-no/Captura+tela+de+2014-01-30+10%253A21%253A20.png but the data cannot repeat.
– isac borgert
@Isac Borgert vc wants to centralize the table and 'paginate' the query?
– rray
Break it by placing limitation of
<tr>
you can do this either by pulling everything to the left or another table to the side.– user3253024
I want the two columns containing data to be divided into a 6 columns, to better occupy the space of the page and not need to scroll too much scrool, and the data may not appear repeated on the screen.
– isac borgert
@user3253024 how do I do this? I can’t repeat the data on the screen
– isac borgert