for ($i=0; $i<scalar(@array); ++$i) { last if (matches($array[$i])); } $found = $array[$i-1] if ($i);
In reply to Re: How do I find the array element directly preceeding a 'match'?
by ton
in thread How do I find the array element directly preceeding a 'match'?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |