php - Wordpress: Space between the slugs -


i have code display slugs of post:

<?php $terms = get_the_terms( $post->id, 'project-category' ); foreach($terms $term){ echo $term->slug; } ?> 

but sticky each other like:

cateogry-01cateogry-02

how can make like:

cateogry-01 cateogry-02

change:

echo $term->slug; 

to:

echo $term->slug . ' '; 

Comments

Popular posts from this blog

c++ - CPP, 'X' button listener -

Get Max value from table in hibernate -

php - Alamofire request parameters empty -