I need to format users input for price lists, and would like to achieve this without using multiple form fields. If the user creates a list, for example:
Eye Treatments<br />
Eyebrow Tint $10<br />
Eyelash Tint $15<br />
Eyelash Extensions (brunched) Full Set $50
<br /><br />
How can I format it like this?
<b>Eye Treatments</b>
<ul>
<li>Eyebrow Tint <span>$10</span></li>
<li>Eyelash Tint <span>$15</span></li>
<li>Eyelash Extensions<i>(brunched)</i> Full Set <span>$50</span></li>
</ul>
Thanks for reading. Any help is appreciated. Lea
Input
PHP
See it.
Output
Assumptions
bractually arebrelements, most likely they are\n(replace'<br />'with"\n"if they are).Recommendations
belement really be ah3or something?