I am trying to retrieve the slug for a tag inside a wordpress post, now its possible to get all tag info using
$tag = wp_get_post_tags($post->ID);
Another option should be to explicitly cast $tag[0] into an array:
$t = (array)$tag[0]; $t["slug"] = ...
Can't get it to work though
Note that the array contains objects (instances of stdClass), not other arrays. So the syntax is:
stdClass
$tag[0]->slug