Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code Challenge if/elseif/else
<?php
$post_id = 10;
$image_size = 'thumbnail';
if ( $image_size == 'full' || $post_id < 5 ) {
// run the if code block
} elseif ( $image_size == 'thumbnail' && $post_id == 10 ) {
// run the elseif code block
} else {
// do the else code block.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment