How to fetch a row of data and store it in an array?
===

I'm having trouble fetching data from my database and storing it in an array.

Here is my current code:

 

    for($i=0; $i <= $servers_default_engines_count; $i++){
            
            //get all servers with this engine type, and get how many
            $query = $db->query("SELECT `id` FROM `cgshop_servers` WHERE `server_engine` = $i");
            $server_id = mysql_fetch_row($query);
            
            $server[$i] = array();  
            array_push($server[$i], $server_id); 
            
        };


Result with mysql_fetch_row:

        [0] => Array
            (
                [0] => Array
                    (
                        [0] => 2
                    )
            )
        [1] => Array
            (
                [0] => Array
                    (
                        [0] => 1
                    )
            )
    )

But it should return something like this:

    Array(
       [0] => Array(
          [0] => 2
       )
       [1] => Array(
          [0] => 1
          [1] => 3 
       )
    )


