title: PHP parsing table/array string
body: <p>Hello Stack Overflow,<br>
    This is my first post and I have a problem I need to parse this text and turn it into an array (its from a database).  </p>
  
  <pre><code>"TableToKeyValues"
  {
      "inventory"
      {
          "slot2"
          {
              "amount"        "10"
              "item"      "wood_plank"
          }
          "slot1"
          {
              "amount"        "10"
              "item"      "metal"
          }
          "slot3"
          {
              "amount"        "10"
              "item"      "plastic"
          }
      }
  }
  </code></pre>
  
  <p>Thanks rtm516.</p>