How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
I would try something like this: $lines = explode(“\n”, $instruction_textarea); // or use PHP PHP_EOL constant if ( !empty($lines) ) { echo ‘<ul>’; foreach ( $lines as $line ) { echo ‘<li>’. trim( $line ) .'</li>’; } echo ‘</ul>’; } It should work.