Silvia, in that case it would be more interesting to see your complete code to understand what is inside the $teste
variable.
The HTML tag for skipping lines is the <tr></tr>
that creates a new line. For each new line, a <tr></tr>
must be added.
If the values of the $teste
are in an array, you can create a loop function, such as for
, for 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>";
}