I have the following markup.I am not able to make it work.It shows syntax error.
if(has_terms( array('something','else'), 'product_cat' ) ) {
$output .= '<div class="list_image">';
$output .= '</div>';
}else{
$output .= '<div class="list_post">';
$output .= '</div>';
}
endif;
What syntax error I made?