-2
I need all the data from a select to be in an array format. All the ways I’ve tried return only the last data from the table. How should I proceed ?
$sql = "SELECT * FROM Termos";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_array()) {
$palavras = "array(" . $row['Descricao']. ")" ;
}
}
If in the database had the words LIFE, TEST AND DREAM, I would like a return exactly like this>
$words = array("life", "test", "dream");
What error is appearing?
– joab
Solved my problem, thank you very much friend, the mistake was on my part here, perfect!
– Navegador
Success, happy to help you
– joab