I have a data from the database that store user’s input from a Textarea box.
This is an example of user’s input in the Textarea box;
iPhone
Samsung
Nokia
When I saved it into the database, I want to display that data to become like this in a table;
1. iPhone
2. Samsung
3. Nokia
So how am I going to display the data with the numbering?
This is my code so far;
<table>
<td align="left"><?php echo nl2br($sis_sistem) ?></td>
</table>
Note : $sis_sistem is the variable that store the data from the database.
explode()into an array on the line breaks, then iterate over it. Rather than numbering them with plain text, you ought to make them a proper HTML ordered list<ol>