I have the values in the database IT213|---|IT214|---|IT215 and want to explode those values.
$subject_query=mysql_query("select * from students where id='$get_id'") or die(mysql_error());
$subject_row =mysql_fetch_array($subject_query);
$explode = explode("|---|", $subject_row['subject']);
foreach($explode as $subjects)
{
$query=mysql_query("select * from subject where code != ('$subjects') ") or die(mysql_error());
}
while($row=mysql_fetch_array($query)) { ?>
<option>
//echo to show values that are not included in the database
</option>
<?php } ?>
How do i not include the values to be echoed from the list of values that are already in my database?
For example, i already have IT215 in my database, i want my option box to not include IT215 in the Option box.(Selections are from IT215, IT216, IT217 down to IT216 and IT217 only)