Q:

php mysqli array issue

I'm trying to replace this array:
$lts = ['20', '21'];

with an array from the database. I've tried a few things with no avail. Here's what I've got now:
$query = "SELECT id FROM members WHERE admin = '2'";
$lts = mysqli_fetch_all($con->query($query), MYSQLI_NUM);

When I var_dump it its giving me this:
array (size=2)
  0 => 
    array (size=1)
      0 => string '20' (length=2)
  1 => 
    array (size=1)
      0 => string '21' (length=2)

I need it to give me this:
array (size=2)
  0 => string '20' (length=2)
  1 => string '21' (length=2)

Any idea on how to get the latter array?

A:

I just notice your returning array is same as the array you got,
  never mind run this code 

//run loop on your array after your query
for($i=0; $i<count($lts); $i++){
    for($j=0; $j<count($lts[$i]); $j++){
        $lts[$i]=$lts[$i][$j];

    }
}
echo '<pre>';
print_r($lts);

