title: How to Transpose Excel Data for MySQL database? (PHP script needed)
body: <p>I have an excel file, with columns titled with the class ID and followed by student IDs for students in the class. See image for detailed reference. EX:</p>
  
  <p>ART VIS D1 | ART VIS D2<br />
  STU000123  | STU000234<br />
  etc...</p>
  
  <p>Which I want to then, somehow, parse and insert into the DB.  Inside my database, I have 3 tables specific to classes. One is called Class. It contains a unique ID (1,2,3, etc) and the ClassID (ex: ART VIS D1).</p>
  
  <p>The other is called Students, which contains the STU IDs (seen in the first table...STU000123 etc), an ID (1,2,3,4 etc), and other personal information. The ID field is what's used to identify the students.</p>
  
  <p>The third table is called student_to_class, essentially matches the ID of the student with the ID  of the class they are assigned to. Structure: id (auto inc),student_id,class_id</p>
  
  <p>Now, what I'm trying to make is a script that will take the Student IDs in the first table, along with the appropriate class, get the class ID and student ID from the Class and Students tables, and then insert those IDs into student_to_class so as to assign them to that class.</p>
  
  <p>Here is a link to the images of all mentioned files/structures:
  <a href="http://img209.imageshack.us/g/excelz.png/" rel="nofollow">http://img209.imageshack.us/g/excelz.png/</a></p>
  
  <p>I'd appreciate any help!</p>