In my form, I have a TextArea Box in which user can input multiple lines in it.
Example of the input;
1) Adam
2) Joe
3) Zack
After I saved the input in the database and I display it in a table. The output will become like this ;
1) Adam 2) Joe 3) Zack
This is the code;
<table>
<tr>
<td align="center"><?php echo $sis_sistem ?></td>
</tr>
</table>
The variable $sis_sistem holds the data that I called from the database.
The problem is that is not what I want for it to display. So how am I going to display it exactly like the user’s input before?
Like this;
1) Adam
2) Joe
3) Zack
I don’t know what happened but when I try back the nl2br() functions several times, it worked. Thank you all and sorry for the mistakes.
Try this :
Your lines breaks might be saved as \n in the database, but you need to use the HTML
tag in a web page.