$sql = "SELECT active FROM table_name";
$result = $conn->query($sql);
DB:
|active|
1
1
0
1 
I've got table like this and need to get that rows into an array. Is it possible to get simple array like this?:
$array = (1,1,0,1);
thanks
$sql = "SELECT active FROM table_name";
$result = $conn->query($sql);
$arr=array();
foreach($result as $res)
{
  array_push($arr,$res->active);
}
var_dump($arr);
$res->active to $res['active']. because it is an array, not an object.->, [] and the result from print_r() or var_dump().$sql = "SELECT active FROM table_name";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
        $arr[]= $row['active'];
    }
print_r($arr);