Wednesday, February 28, 2018

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

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...