I get this error when I go through a for with the results of a sql:
$datos = serialize($res);
$html = "";
for($i = 0; $i < count($res);$i++){
$html = $html.'<form action="exportarTxartelak.php" method="post">
<div class="row alumno">
<div class="col-4">'
.$res[$i]["NOMBRE"].'
</div>
<div class="col-8" style="/*margin-bottom: 2rem; padding-left: 5px">
<input type="submit" name="word" style="margin: 0 0 0 10px" class="btn btn-primary" value="'.$lang["WORD"].'">
<input type="submit" name="pdf" style="margin: 0 0 0 10px" class="btn btn-primary" value="'.$lang["PDF"].'">
<input type="submit" name="mail" style="margin: 0 0 0 10px" class="btn btn-primary" value="'.$lang["EMAIL"].'">
</div>
</div>
<div class="col-12 info">
<textarea style="/*display: none;" name="resultado">'.base64_encode($datos).'</textarea>
<input style="/*display: none;" type="text" name="USCOD" value="'.$res[$i]["USCOD"].'">
</div>
</form>';
}
echo $html;
There comes a point where this for returns error, exactly on lap # 19.
The complete for can occupy up to 1041 results. I intend to create a list (without pagination) that the user shows me with 3 buttons.
What leaves me with concern is that I have made loops with these same data but more complex (generating a complete html) and I have not given any problem.
Finally, if I remove the base64_encode($datos)
, it lists me correctly, but I need it inside the form.
Note: I can not access the server files to edit the memory