3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $terms = array(1, 2, 3, 4); echo '<p class="video-terms">'; $output = array(); foreach($terms as $term) { $link = "#"; $output[] = '<a href="'. $link .'">Item '.$term.'</a>'; } echo implode( ',', $output ); echo '</p>';
based on fnpsA
Output for 4.3.0 - 5.6.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
<p class="video-terms"><a href="#">Item 1</a>,<a href="#">Item 2</a>,<a href="#">Item 3</a>,<a href="#">Item 4</a></p>