Unexpected T_ECHO warning? [closed]
I get a UNexpected T_ECHO warning when I add the following line:
<div id="counter"><?php (function_exists('fbshare_manual')) echo fbshare_manual(); ?></div>
I'm not sure what's a T_ECHO and what's the problem. Any suggestions?
You seem to be missing an if
.
<div id="counter"><?php if (function_exists('fbshare_manual')) echo fbshare_manual(); ?></div>
Explanation: T_ECHO
stands for the "echo" keyword. "Unexpected T_ECHO" means that word was somewhere it shouldn't be. (Absent the if
, PHP would consider the stuff in parens and the echo
as two separate statements, and would expect a semicolon or something between the two.)
I think you need an if
after that opening php tag.
<div id="counter"><?php (function_exists('fbshare_manual')) echo fbshare_manual(); ?></div>
^-- Insert "if"
精彩评论