<input type="text" list="req" name="req" style="width:350px; height:70px;"><datalist id="req">
<option value=""><option>
<?php while($getreq = $requirements->fetch_array()){ ?>
<option><?=$req = preg_replace("/\r\n|\r|\n/",'<br/>',$getreq['req']);?></option>
<?php } ?>
</datalist>
I have this query from database with 50rows, some rows the text have breakline. But the thing is when I check the datalist the breakline doesn't work.
ex:
No1 - Visible Fracture(s) of the center member.2 - The center member separates.3 - Loses air pressure in 1 minute.
but in my database it's like this.
No
1 - Visible Fracture(s) of the center member.
2 - The center member separates.
3 - Loses air pressure in 1 minute.
Any idea how to solve my problem.?
Database
ID Req
1 Bead Unseating Test Min. 9100 N
2 Breaking Energy Test Min. 113 N.m. (J)
3 No<br/>1 - Visible Fracture(s) of the center member.<br/>2 - The center member separates.<br/>3 - Loses air pressure in 1 minute.
Must be Output in datalist or Select Option (Dropdown Menu)
Bead Unseating Test Min. 9100 N
Breaking Energy Test Min. 113 N.m. (J)
No
1 - Visible Fracture(s) of the center member.
2 - The center member separates.
3 - Loses air pressure in 1 minute.
doesn't work in Select Option and Datalist. I have no idea how to make it work. sadly – Genina Anne Gabuten Jan 09 '17 at 17:05