Remove last comma from array
-
Hello,
How can I not show the last comma in an array.
I have the following code:<?php $values = get_field('systeem'); if($values) { echo '<li>Color(s) used: <span class="white">'; foreach($values as $value) { echo $value . ', '; } echo '</span></li>'; } ; ?>
https://www.ads-software.com/plugins/advanced-custom-fields/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Remove last comma from array’ is closed to new replies.