1
I’m creating a search system where the user will only post the month and year they want to search. but I’m not getting the code is as follows
$output='<h2 class="text-center mb-4" style="color:red">Elementos</h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr class="jumbotron">
<th>Nº Interno</th>
<th>Nome</th>
<th>SV</th>
</tr>
</thead>
'.do{.'
<tbody style="border-bottom:2px solid red;">
<td>'.$row_elementos['N Interno'].'</td>
<td>'.$row_elementos['Nome'].'</td>
<td>'.$total.'</td>
</tbody>'.
}while ($row_elementos = mysql_fetch_assoc($elementos)).'
</table>
</div>';
Then print the base of the search done below with the following code
<?php print("$output");?>
the errors are in {do(syntax error, Unexpected 'do'(T_DO))} and {while(syntax error, Unexpected '}' }. How should I correct my mistakes?
Close the string first, then do a normal while.
– rray
how so? while is only done on that site
– Adelino Vasconcelos
He meant to close the string there on the thead and do the normal while
– Anderson Henrique
but this is done after a search
– Adelino Vasconcelos