Here's the issue:
I retrieve the following data string from my database:
$row->exceptions = '1,2,3';
After explode
I need the below code to check each one of the exploded pieces
$exceptions = explode(",", $row->exceptions);
//result is
//[0] => 1
//[1] => 2
//[2] => 3
for ($i = 0; $i <= $row->frequency; $i++) {
if ($exceptions[] == $i) {
continue;
} else {
//do something else
}
}
How can I make $exceptions[]
loop through all keys from the exploded array so it evaluates if ==$i
?
Thanks for helping.