0
How the function works mysqli_fetch_assoc? Example, if I use it in a function like is below in PHP. What it does?
function buscar_tarefas($conexao){
$sqlBusca = "SELECT * FROM tarefas";
$resultado = mysqli_query($conexao, $sqlBusca);
$tarefas = array();
while($tarefa = mysqli_fetch_assoc($resultado)){
$tarefas[] = $tarefa;
}
return $tarefas;
}
It’s boring, yes, but we need to ask: did you research documentation? Did you get doubt in any specific part? What you really didn’t understand about the function?
– Woss
my doubt was the return of function, did not understand how it works.
– user106463