The array is something like:
<?php
$a = array(1,0,1,0,1,0,0,1,1);
?>
Is there a way to evaluate the array to see if 2 1's are consecutive? Or if this is easier to read:
<?php
$a = array("IN","OUT","IN","OUT","IN","OUT","OUT","IN","IN");
?>
I'm trying to execute code anytime 2 INs are consecutive.
This might not be the best way to go about it, but basically I'm trying to determine if something was done before it's other required action has been completed. So I query the dB and select all of its events in order of the time of the event, and then output it into an array so that I can tell if the proper conditions were met. If there were 2 INs before an OUT, then that's a problem and needs to be echoed out...