0
I need to bring results from a database that stays that way:
Fernando Pessoa, Pablo Neruda, Manuel Bandeira
For that, I’m trying this way:
$sql = mysqli_query(...);
$mostrar = mysqli_fetch_all(MYSQLI_ASSOC);
echo join(",",$mostrar["Nome"]);
But it brings no return, nor with var_dump(). I see you’ve got that post, but I couldn’t understand very well how it works. How can I use in procedural mode?
When I use it that way:
while($cs = mysqli_fetch_array($sql))
{
echo $cs["Nome"];
}
Works normally!
Hello William. Try this way, but it didn’t work either.
– user24136
Show an error? Is the SQL query correct? If it is not
$sql
may be a boolean and not work– Costamilam
No error and the query is right. I changed my post and includes it with while() which normally returns the results.
– user24136
Guilherme, your solution works on my site, but not on the remote server. I believe it is some configuration there. I put an alternative solution and I thank you for your help.
– user24136
I updated the answer
– Costamilam