I have the below code
$Query='SELECT * FROM `courses`';
$result=mysqli_query($connection,$Query);
echo'<select name="courses" multiple>';
while($data=mysqli_fetch_array($result))
{ echo"<option value=\"";$data['title'];echo"\">";$data['title'];echo'</option>';}
echo"</select>";
I am trying to return values from a table,Database into a Multiple Selection menu. but it keeps giving me the below error
Parse error: syntax error, unexpected 'echo' (T_ECHO) in C:\wamp\www\ETT Logo\Controlpanel\addteacher.php on line 51
Please note that Line 51 is the line inside of the 'while' brackets.
Will Appreciate any solutions.