Silvia, in this case it would be more interesting to see your complete code to understand what is inside the variable $teste
.
The HTML tag for skipping lines is <tr></tr>
which creates a new line. Each new line must be added a <tr></tr>
.
If the variable values $teste
are in an array, you can create a loop function, such as the for
, as an example:
<?php
$valores = [
'produto1',
'quantidade1',
'responsavel1',
'data1',
'produto1',
'quantidade2',
'responsavel2',
'data2'
];
$html = "";
for ($n = 0 ; $n < count($valores) ; $n++) {
if ($n % 3 == 0 || $n == 0)
html += "<tr>";
html += $valores[$n];
if($n % 3 == 0 || $n == 0)
html += "</tr>";
}
You are using the datatable?
– MarceloBoni
Try it like this...;
<td><?=$teste['cod_refugo_teste'];."</br>".$teste['qtd_refugo']; ?></td>
– MarceloBoni
Post your table html structure. This is a table matter, not php
– Pedro Augusto
See: https://jsfiddle.net/mgd2b75p/6
– MarceloBoni
Marcelo, the problem is that I will be skipping the cod_refugo_test and qtd_refuse arrays. I want you to skip the line to every scrap and every amount, you know?
– Sílvia Demarchi
When you say skip the line is to leave the fields all blank except the scrap and quantity ? I think it would be clearer if I set an example of how I expected it to look.
– Isac
Without an example gets very confusing what you really need.
– fernandosavio