<?php
//display all categories that have at least one post, separate each category with comma+space, put each category in quotes
$categories=get_categories();
if ($categories) {
$cat_count =count($categories);
$output = '';
foreach($categories as $category) {
if ($category->count > 1) {
$output .= '"<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a>", ';
}
}
}
echo '<p>' . substr($output, 0, -2) . '</p>'; // display all but the last comma
?>
Thanks so much Michael. I’ll give it a go.
Best – David