Which of the following is the correct way to print the slug property of $firstTag object in this code snippet?$tags = wp_get_post_tags($post->ID); $firstTag = $tags[0];

By ·
Which of the following is the correct way to print the slug property of $firstTag object in this code snippet?$tags = wp_get_post_tags($post->ID);
$firstTag = $tags[0];
Answers:
1.      $firstTag[‘slug’];
2.      $firstTag->slug

3.      $firstTag.slug
$firstTag[0][‘slug’]
GA
Gaurav Arora, Digital Media Lead. 10+ years running paid media and tracking for brands in the USA, UK and Canada.