I have a strange thing happening and I don't know why. I have a multidimensional array that looks like this:
Array ( [0] => Array (
[title] => I'm a title
[desc] => Value1*Value2*Option1*Option2*Option3*Value3))
When I output it into a table everything works perfectly except the option values. I get a blank option after each value. Why is that? Here's what I have:
for ($j=0; $j<count($_SESSION[$ses]); $j++){
echo '<tr><td>'.$_SESSION[$ses][$j]['title'].'</td>';
$desc = explode("*", $_SESSION[$ses][$j]['desc']);
echo '<td>$'.$desc[0].'</td><td>'.$desc[1].'</td><td><select>';
for ($i=2; $i<count($desc)-1; $i++){
echo '<option>'.$desc[$i].'<option>';
}
echo '</select></td>
}
I couldn't find a solution anywhere. Any advice? It's not the end of the world but it just doesn't look ideal. Thanks in advance.