Convert text lines to list items

            <?php             
              // Get the points from the ACF field
              $points = get_sub_field('points');
              
              // Add new line to each point
              $points = explode("\n", $points); 
              
              // Now convert to HTML
            ?>
              
            <ul><?php
            
              foreach($points as $point) : ?>
                <li><?php echo $point ?></li><?php
              endforeach; ?>

            </ul>

Leave a Reply

Your email address will not be published. Required fields are marked *