简体   繁体   English

解析错误:语法错误,意外的“回声”(T_ECHO)

[英]Parse error:syntax error,unexpected 'echo'(T_ECHO)

I want to create an event calendar but I got this message below after I execute the code below.我想创建一个事件日历,但在执行下面的代码后我收到了下面的消息。

Parse error:syntax error,unexpected 'echo'(T_ECHO)解析错误:语法错误,意外的“回声”(T_ECHO)

the error is on this line错误在这一行

return '<li id="li-'.$this->currentDate;?> <a href="index.php?tarikh=<?php echo $readrow['fld_tarikh']; ?>"></a><?php '"class=btn btn-info btn-lg data-toggle="modal" data-target="#myModal""'.($cellNumber%7==1?' start ':($cellNumber%7==0?' end ':' ')).
            ($cellContent==null?'mask':'').'">'.$cellContent.'</li>'

I'm trying to find the solution, but failed.我试图找到解决方案,但失败了。 so, i really hope that someone can help me.所以,我真的希望有人能帮助我。 thank you...谢谢你...

Try this,尝试这个,

return '<li id="li-'.$this->currentDate;?> <a href="index.php?tarikh=<?php echo $readrow['fld_tarikh']; ?>"></a><?php echo "class=btn btn-info btn-lg data-toggle='modal' data-target='#myModal'".($cellNumber%7==1?' start ':($cellNumber%7==0?' end ':' ')).
($cellContent==null?'mask':'').'">'.$cellContent.'</li>'

I think the problem is here,我觉得问题出在这里

<?php '"class=btn btn-info btn-lg data-toggle="modal" data-target="#myModal""'.($cellNumber%7==1?' start ':($cellNumber%7==0?' end ':' '))

HTML part is not getting echoed correctly. HTML部分没有得到正确回显。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM