-->

Tuesday, June 20, 2017

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];

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’]
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
 

Delivered by FeedBurner