$method1 = '<ul><li>' . implode('</li><li>', explode("\n", $method)) . '</li></ul>';
I have this code here and i am trying to parse the input so that each new line that is entered into a text box is parsed to a bullet list, but for some reason this code is only doing the first line
Example:
do this
do this
turns into this inside a single variable:
<ul>
<li>do this</li>
<li>do this</li>
</ul>
Do you mean this (I’ve used your variable names):