Tuesday, 11 October 2016

php - Parse error: syntax error, unexpected 'endif' (T_ENDIF)?



I getting error with php endif, couldn't find the error. here I have given my code. please help me to fix this



       

$video_banner = get_sub_field('video-banner');
?>




Answer




Wrong syntax there :






To be replaced by







writting a ; after the condition of a if is like writting



    if( $video_banner )
{
; //Do nothing
}
?>



This means you have one endif; in excess


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...