Hello,
I have the following function that returns me the data needed to populate my dropdown:
function listaRedes($conexao){
$dados = array();
$resultado = mysqli_query($conexao, "SELECT DISTINCT rede FROM evolucao_originacao");
while($valores = mysqli_fetch_array($resultado)){
array_push($dados, $valores);
}
return $dados;
};
And in my dropdown, I'm doing the following code:
<?php $redesBanco = listaRedes($conexão); ?>
<div class="form-group">
<select class="form-control" id="dropdown-parceria">
<option value="0">---SELECIONE---</option>
<?php
while($redesBanco){
echo "<option value='".$redesBanco."'>".$redesBanco."</option>";
}
?>
</select>
</div>
But at the time it populates my dropdown, the result is as follows: