/**
 * Prints a comma-separated list of tags for the current book.
 * @param bool $echo Whether or not to echo the results.
 */
function print_book_tags($echo = true)
{
    global $book;
    $tags = get_book_tags($book->id);
    if (count($tags) < 1) {
        return;
    }
    $i = 0;
    $string = '';
    foreach ((array) $tags as $tag) {
        if ($i++ != 0) {
            $string .= ', ';
        }
        $link = book_tag_url($tag, 0);
        $string .= "<a href='{$link}'>{$tag}</a>";
    }
    if ($echo) {
        echo $string;
    }
    return $string;
}
/**
 * Prints a comma-separated list of tags for the current book.
 * @param bool $echo Whether or not to echo the results.
 */
function print_book_tags( $echo = true ) {
    global $book;

    $tags = get_book_tags($book->id);

    if ( count($tags) < 1 )
        return;

    $i = 0;
    $string = '';
    foreach ( (array) $tags as $tag ) {
        if ( $i++ != 0 )
            $string .= ', ';
        $link = book_tag_url($tag, 0);
        $string .= "<a href='$link'>$tag</a>";
    }

    if ( $echo )
        echo $string;
    return $string;
}