PHP mysqli_fetch_assoc存储到一个数组中

I am having troubles pulling a row from sql query and storing it into an array. Here is my code.

$sql = "SELECT water, importdate
        FROM customer_table
        WHERE customer_number = '" . $custNum . "';";
        $result_of_login_check = $this->db_connection->query($sql);
        echo $sql . "<br>";
        $result = mysqli_query($this->db_connection,$sql);

        // set array
        $array = array();

        // look through query
        while($row = mysqli_fetch_assoc($result)){

        // add each row returned into an array
        $array[] = $row;
        }
        print_r($array);

This is what the output looks like when I print the array,

Array ( 
    [0] => Array ( 
        [water] => 23 
        [importdate] => 2014-03-29 
    ) 
    [1] => Array ( 
        [water] => 33 
        [importdate] => 2015-02-22 ) 
    )

While it is storing, I am stuck at trying to figure out how to copy each row into the array so it looks like this,

Array ( 
    [water] => 23 
    [importdate] => 2014-03-29
) 
Array ( 
    [water] => 33 
    [importdate] => 2015-02-22
)

Which is each row stored in $row.

What I am going for is that I need to pull a list of bill amount and dates from the same customer from my database and then display each month by date. Showing the current months bill.

Thanks for your help!

Who is containing the objects when you say?

Array ( 
    [water] => 23 
    [importdate] => 2014-03-29
)
 Array ( 
    [water] => 33 
    [importdate] => 2015-02-22
)

Nothing.. You need to have an array containing this arrays, or you need to have multiple arrays indexed somewhere, what is basically an array with arrays. So nothing wrong with that format..

Why you need this format specifically? It doesn't make sense..

I ended up changing the way I stored the data. I pulled the row apart and put them into two different arrays and stored them in the session. Below is the code.

            // set array
            $costArray = array();
            $dateArray = array();
            $i = 0;

            // look through query
            while($row = mysqli_fetch_assoc($result)){

              // add each row returned into an array
              $array[] = $row;

              //print_r($row);

              list($id,$two) = each($row);
              $costArray[$i] = $two;

              //echo "Total bill" . $two;

              list($id,$two) = each($row);
              $dateArray[$i] = $two;

              $i++;

            }
            $_SESSION['cost'] = $costArray;
            $_SESSION['date'] = $dateArray;

They are both the same length so I ended up pulling the arrays out of the session, storing them into a variable and displaying them like this.

for ($i = 0; $i < count($costArray); ++$i) {
echo $dateArray[$i]. " $" . $costArray[$i] . "<br>";
}

Thanks for all your help, it made me realize how hard I was making it.