title: adding a value to an associative array with a foreach?
body: <p><em><strong>Solution Found and voted on</em></strong></p>
  
  <hr>
  
  <p>Here is my code:</p>
  
  <pre><code>//go through each question
  foreach($file_data as $value) {
      //separate the string by pipes and place in variables
      list($title, $content, $date_posted) = explode('|', $value);
  
      //create an associative array for each input
      $file_data_array['title'] = $title;
      $file_data_array['content'] = $content;
      $file_data_array['date_posted'] = $date_posted;
  
  }
  </code></pre>
  
  <p>What happens is that the assoc values keep getting erased. Is there a way I can have the value append to array? If not, how else could I do this?</p>