title: Store and retrieve multidimensional array using PHP
body: <p>I am developing a webapp for teachers which may have hundreds of users who may each create ten or so templates with ten or so sections with ten or so topics each of which will have a long and short version of a piece of text. </p>
  
  <p>This would result in a multidimensional array like this:</p>
  
  <pre><code>[userID][templates][1][name]            // template 1 name
  [userID][templates][1][1][name]         // template 1 section 1 name
  [userID][templates][1][1][1][name]      // template 1 section 1 topic 1 name
  [userID][templates][1][1][1][1][short]  // template 1 section 1 topic 1 option 1 short
  [userID][templates][1][1][1][1][long]   // template 1 section 1 topic 1 option 1 long
  </code></pre>
  
  <p>Where each number may vary (up to about 10). The 'name' elements just represent user-friendly names.</p>
  
  <p>There may also be some other settings outside of the template element.
  Only text needs to be stored and retrieved. What is the easiest way to store and retrieve this data. Will I need to create thousands of mySQL tables (is that way too many? I have only ever used up to 5) or is there a more straightforward way?</p>