How can I concatenate a while to put into an array. How to make this piece of code work?
$nestedData[] = $row["nomerota"];
$tr="<select size='1'>";
$tr.= while ($row = mysqli_fetch_array($resultado))
{
<option value='$row['nome'];'>$row['nome'];</option>
}
$tr.="</select>";
$nestedData[] = $tr;
My problem is here:
$tr.= while ($row = mysqli_fetch_array($resultado))
{
<option value='$row['nome'];'>$row['nome'];</option>
}