I am wanting to separate these links that are outputted by a comma, but with no comma on the last link. What is the best way to achieve this?
<p class="favs">Favourite Courses:
<?php
$user_id = bp_get_member_user_id();
$array = get_user_meta($user_id, 'wpfp_favorites', true);
foreach ($array as $key => $value) {
$queried_post = get_post($value); ?>
<a href="http://publicaccessgolf.com.au/<?php echo $queried_post->post_name; ?>" title="<?php echo $queried_post->post_title; ?>" ><?php echo $queried_post->post_title; ?></a>
<?php } ?>
</p>