title: Storing array with values in database
body: <p>I have the following data which I want to save in my DB (this is used for sending text messages via a 3rd party API)</p>
  
  <pre><code>text_id, text_message, text_time, (array)text_contacts
  </code></pre>
  
  <p><code>text_contacts</code> contains a normal array with all the <code>contact_id</code>'s</p>
  
  <p>How should I properly store the data in a MySQL database?
  I was thinking myself either on 2 ways:</p>
  
  <ol>
  <li>Make the array with contact_id's in a json_encoded (no need for serializing since it's not multi-dimensional) string, and store it in a text field in the DB</li>
  <li>Make a second table with the text_id and all contact_id's on a new row..</li>
  </ol>
  
  <p><strong>note</strong>: The data stored in the text_contacts array does <strong>not</strong> need to be changed at any time.</p>
  
  <p><strong>note2</strong>: The data is used as individual contact_id to get the phone number from the contact, and check whether the text message has actually been sent.. (with a combination of text_id, and phonenumber)</p>
  
  <p>What is more efficiënt, and why?</p>