Home › Forums › Back End › Am I not doing the "or" correctly? › Reply To: Am I not doing the "or" correctly?
March 18, 2014 at 10:06 am
#166142
Participant
if ( in_array('Cummins', $trucks) ) {
echo 'Trucks!';
}
Isn’t it redundant to have Cummins and $trucks since Cummins is a truck. Why can’t you just do…
if ( in_array($trucks) ) {
echo 'Trucks!';
}