Basically I have this:
<?php
$variable = 8;
if ( $variable == array(5,6,7) ) :
echo '<p>'.$variable.'</p>;
endif;
?>
Can I test if a variable is one of those values like that or do I have to test each individually, like:
<?php
$variable = 8;
if ( ( $variable == 5 ) || ( $variable == 6 ) ) :
echo '<p>'.$variable.'</p>;
endif;
?>
Thanks.