I am using the following code to display my custom taxonomy slugs. However it is only displaying the first category and not all the related categories. I know this is fairly simple and is to do with [0] but I can't figure out how to change it.
$getslugid = wp_get_post_terms( $post->ID, 'opd_taggallery' );
$getslug = $getslugid [0]->slug;
echo $getslug;