title: split a string whilst use left join
body: <p>I have two databases. The first contains a list of upload doucuments and who they are for when uploaded and expiry date. This is stored as numbers representing each grade of person using implode. so column name 'foagrade' has 10,11,12 in row one. The second database is a list of grades and there ID's eg 10 = manager, 11 = HR etc. I am using left join and a basic html table to display a query. </p>
  
  <pre><code>$result = mysqli_query($con,
  "SELECT UPLOAD.id, UPLOAD.title, UPLOAD.faoGrade,UPLOAD.faoLocation, UPLOAD.date,   UPLOAD.expiry, GRADE.ID, GRADE.GRADE as GR, GRADE.id
  FROM UPLOAD
  LEFT JOIN GRADE ON
  UPLOAD.faoGrade=GRADE.ID
  where owner=$user");
  echo "&lt;table id='previous'&gt;
  &lt;tr&gt;
  &lt;th&gt;Title/Document name:&lt;/th&gt;
  &lt;th&gt;For attention of Grade&lt;/th&gt;
  &lt;th&gt;For Location&lt;/th&gt;
  &lt;th&gt;date&lt;/th&gt;
  &lt;th&gt;Date expires&lt;/th&gt;
  &lt;th&gt;Delete this briefing&lt;/th&gt;
  &lt;/tr&gt;";
  
  while($row = mysqli_fetch_array($result))
    {
    $id=$row['id'];
    echo "&lt;tr&gt;";
    echo "&lt;td&gt;" . $row['title'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['GR'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['foaLocation']."&lt;/td&gt;";
    echo "&lt;td&gt;" . date("D, d M Y ",($row['date']));
    echo "&lt;td&gt;" . date("D, d M Y ",($row['expiry']));
    echo "&lt;td&gt;&lt;a href=pages/login/upload_delete.php?item=".$id."&gt;delete&lt;/a&gt;&lt;/td&gt; ";
    echo "&lt;/tr&gt;";
    }
  echo "&lt;/table&gt;";
  </code></pre>
  
  <p>The query shows all the details but only shows the first grade stored in the column faograde (MANAGER) not 11 or 12. 
  How would I explode or split this? So for each number in this column a grade name is shown. i will also have to do the same for column 'faoLocation', but working on one issue at a time. </p>