Rookie PHP question

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-05-03T18:01:26Z Indexed on 2010/05/03 18:08 UTC
Read the original article Hit count: 443

I am hacking together a theme for wordpress and I am using the following code to pull out data from a custom field with several values:

            <?php  $mykey_values = get_post_custom_values('services');
            foreach ( $mykey_values as $key => $value ) {
            echo "<span>$value, </span>";
            } ?>

I use a comma to seperate the results, but I don't want a comma after the last result. How do I get around this?

© Stack Overflow or respective owner

Related posts about wordpress-theming

Related posts about custom-fields