-2
Hello, I want to take all the lines of the DB with the while instead of putting one by one and they turn variable according to the line of the db
<?php
$link = mysqli_connect($dba['host'], $dba['user'], $dba['pass'], $dba['db']) or die("Error " . mysqli_error($link));
$sql = "SELECT * FROM clientes";
$query = mysqli_query($link, $sql) or die(mysqli_error($link));
while ($row = $query->fetch_assoc()) {
$configuracao['perfil'] = $row['perfil'];
}
I was wearing it inside the while:
$configuracao['perfil'] = $row['perfil'];
$configuracao['idade'] = $row['idade'];
$configuracao['local'] = $row['local'];
Has some form of the while transform variables according to what is in the database?
"transform the variables", Can you explain that part better? What kind of "transformation" do you imagine?
– Woss
i was putting all db data into variables for example $setting['profile'] = $Row['profile']; $setting['age'] = $Row['age']; $setting['local'] = $Row['local']; manually, I want to know if there’s a while to do it for me instead of me for one by one
– Victor Brito