PhP Multidimensional Array concating indexes together
<p>Let me start off by saying that I am fairly new to php. I am trying to create a multidimensional array but running into a weird result when I look at the result. I have a feeling that the syntax I am using is not correct but cannot verify that anywhere online. So I am posing the question here. </p>

<p>Here is the gist of what I am trying to do:</p>

<pre><code>// Given: $row["foo"] == "Hello" &amp;&amp; $row["bar"] == 1

while($row = mysqli_fetch_array($query_result, MYSQLI_ASSOC)){
    $multiArray[$i] = $row["foo"];
    $multiArray[$i]["lorem"] = $row["bar"];
    $i++;   
}
</code></pre>

<p>When I go to print <code>$multiArray[$i]</code> I get: <code>1ello</code>.</p>

<p>As I said I believe that the error lies in my syntax of how I am assigning this multidimensional array. Can someone please help me find a similar method to (what I can only guess) php madness above?</p>

<p>Thank you in advance!</p>
