谁能帮忙
<?php
if(((count( $replies ) > 6) and
(count( $replies ) <= 12)) and
($replyNumber == '3','4','5'))
{ ?>
<execute code......>
<?php } ?>
为什么由于使用逗号(在回复编号中为 3,4,5 时出现代码错误
最佳答案
像这样更改您的代码:
<?php
$varArray = array('3','4','5');
if( ((count( $replies ) > 6) && (count( $replies ) <= 12)) && (in_array($replyNumber,$varArray)) ) { ?>
<execute code......>
<?php } ?>
关于由于逗号导致 PHP 逻辑语句语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45234306/