谁能帮忙
<?php
if(((count( $replies ) > 6) and
(count( $replies ) <= 12)) and
($replyNumber == '3','4','5'))
{ ?>
<execute code......>
<?php } ?>
为什么由于使用逗号(以3,4,5的回复数表示)在代码中出现错误
您的代码有错误
($replyNumber == '3','4','5'))
它可能像
($replyNumber == '3' && $replyNumber == '4' && $replyNumber == '5'))
在你的代码中
'and'
应该转换'&&'
为'and'
php中不允许的
和完整的代码就像
<?php
if(((count( $replies ) > 6) &&
(count( $replies ) <= 12)) &&
($replyNumber == '3' && $replyNumber == '4' && $replyNumber == '5'))
{ ?>
<execute code......>
<?php } ?>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句