dougai3418 2016-03-10 06:55
浏览 39
已采纳

PHP Parse错误:语法错误,意外T_ECHO [重复]

This question already has an answer here:

I am receiving the this error

"Parse error: syntax error, unexpected T_ECHO"

with the following php code. I've checked brackets and quotes but I can't seem to find it.

<?php
if(!$_GET['ae']):
    _e('<a href="'.echo get_permalink(icl_object_id(9132, 'page', true)).'" class="row">foo</a>');
endif;
?>
</div>
  • 写回答

1条回答 默认 最新

  • doujiao7325 2016-03-10 07:01
    关注

    Since _e function already echoes things,so no need for that extra echo

    <?php
    if(!$_GET['ae']):
        _e('<a href="'.get_permalink(icl_object_id(9132, 'page', true)).'" class="row">foo</a>');
    endif;
    ?>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?