title: dynamic WordPress custom meta boxes
body: <p>I'll try and give an example what i want:</p>
  
  <p>(this isn't what I'm doing, but it seems like a decent example of how I'd like it to work)</p>
  
  <p>Imagine we have a custom post type (CPT) of 'houses' and one of the custom meta options for this CPT is 'bedrooms' - obviously, different houses have different amount of bedrooms, all of which have different properties. So, I'd like to be able to allow the user to add several different properties about a bedroom i.e.</p>
  
  <p>Dimensions, aspect, number of windows and floor type</p>
  
  <p>When the user has added these details for the first bedroom, if the house has a second bedroom then I would like them to have an 'add bedroom' button and another set of these meta boxes is added so they can fill out the details about bedroom 2.</p>
  
  <p>I understand that I'll need some javascript to add this facility (and something I don't mind writing) but what I'm struggling with in my poor, useless brain is how to save these to the database. I want to achieve this using WordPress meta so that I don't add any unnecessary database tables and I'm sure it's possible I just can't quite fathom the principles of how to save the data.</p>
  
  <p>Pointers to any tutorials would be brilliant, or some examples of plugins which already do this kind of thing would be very gratefully received.
  here is a screenshot to get an idea what i want to do.
  <img src="https://i.stack.imgur.com/f3eeO.jpg" alt="enter image description here"></p>
  
  <p><strong><em>Solution:</em></strong>
  I have found solution here, it might be helpful for someone. 
  <a href="https://wordpress.stackexchange.com/questions/25478/custom-post-type-metabox-array">https://wordpress.stackexchange.com/questions/25478/custom-post-type-metabox-array</a></p>