syntax error, unexpected 'endif' (T

This question already has an answer here:

  • PHP parse/syntax errors; and how to solve them? 13 answers

  • What is the following doing?

    <?php endif; ?>
    

    You're closing a non existent if statement - based on the code you've given.


    You are missing semicolon in both of if statement

    View

    if ($exec == 'true'){
        echo '<script type="text/javascript">
        alert("email alreay exist");
        </script>';
    }
    

    Controller

    if($exec) {
        true;
    } else {
        FALSE;
    }
    

    Please replace your code as per above explanation. i hope it will work for you !


    SIMPLE ANSWER. REMOVE THE <?php endif; ?> <?php endif; ?> FROM YOUR CODE AND IT WORKS LIKE A CHARM. ALSO, ADD ; AT THE END OF echo STATEMENT

    链接地址: http://www.djcxy.com/p/69862.html

    上一篇: 解析错误:语法错误,意外的'endif'(T

    下一篇: 语法错误,意想不到的'endif'(T