I want to know the best way to do a PHP IF OR statement.. but I have a list of arrays over 30+
This is the current format of the array:
if($cq=="45" || $cq=="45" || $cq=="35") {
// action to my function
}
I know I can do an array but Array(); does not support conditions..
Thanks
UPDATE – I know it is old, even I know that and I am novice PHP. Look at my profile questions example (blank ones)
This is the code I was left with:
if(
$cq=="45" ||
$cq=="53" ||
$cq=="37" ||
$cq=="70" || //
$cq=="74" || //
$cq=="36" || // - this function removes colours if they have this ID
$cq=="66" || //
$cq=="61" || //
$cq=="69" ||
$cq=="20" ||
$cq=="55" ||
$cq=="50")
{
}
1 Answer