title: PHP array's, how to access keys and values
body: <p>Trying to learn multidimensional arrays but seem to constantly struggle with accessing them. I still have not got grasps of how you access them using index, keys, values. </p>
  
  <p>How do I get to the actual word "Title" and it's value?</p>
  
  <p>Here I have one I was playing with.</p>
  
  <pre><code>$shop = array( array( "Title" =&gt; "rose", 
                        "Price" =&gt; 1.25,
                        "Number" =&gt; 15 
                      ),
                 array( "Title" =&gt; "daisy", 
                        "Price" =&gt; 0.75,
                        "Number" =&gt; 25,
                      ),
                 array( "Title" =&gt; "orchid", 
                        "Price" =&gt; 1.15,
                        "Number" =&gt; 7 
                      )
               );
  
  Which prints a structure such as this:
  
  Array
  (
      [0] =&gt; Array
          (
              [Title] =&gt; rose
              [Price] =&gt; 1.25
              [Number] =&gt; 15
          )
  
      [1] =&gt; Array
          (
              [Title] =&gt; daisy
              [Price] =&gt; 0.75
              [Number] =&gt; 25
          )
  
      [2] =&gt; Array
          (
              [Title] =&gt; orchid
              [Price] =&gt; 1.15
              [Number] =&gt; 7
          )
  
  )
  
  echo $shop[0][0][0]; //I Expect "rose" but I get "Undefined offset: 0"
  echo $shop['Price']; //I expect 1.25 but I get "Undefined index: Price"
  
  foreach($shop as $key=&gt;$value)
  {
  echo $key; //I expect the key values "Title/Price/Number" instead I get Index numbers 0 1 2
  echo $value; //I expect all values of keys e.g. "rose",1.25,15/"daisy",0.75,25/"orchid",1.15,7 Instead I get Array to string conversion error
  }
  </code></pre>
  
  <p>What I am trying to do, is take all the title and value from the shop array, and put it into a new array called $x = array(); and then take a car key/value from a different array and combine them together. </p>
  
  <p>so the new array ends up looking like this:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [Title] =&gt; rose //from $shop array
              [Car] =&gt; Mercedez //from $car array
          )
  
      [1] =&gt; Array
          (
              [Title] =&gt; daisy //from $shop array
              [Car] =&gt; Ford //from $car array
          )
  
      [2] =&gt; Array
          (
              [Title] =&gt; orchid //from $shop array
              [Car] =&gt; Bentley //from $car array
          )
  
  )
  </code></pre>
  
  <p>Also is there a way to access the actual name of the key "title" and not a index number?</p>