Stop script when item occurs in array
I've got an array like this

    array
      2 => string 'Member forum 1'
      5 => string 'Member forum 5'
      8 => string 'Moderator forum 8'
      9 => string 'Member forum 9'

I would like to write a script that, once it hits the `Moderator`-tag, stops looking for the tag and continue with a variable which contains `true` or something alike for which I can tell a user is a Moderator on any form of just a normal member.

 I have been experimenting with `in_array` and `preg_match` but everytime I end up with a `false` result, cause the last item of the array (`Member forum 9`) overwrites the  `true` value of the last but one value (`Moderator forum 8`);
Stop script when item occurs in array
===

I've got an array like this

    array
      2 => string 'Member forum 1'
      5 => string 'Member forum 5'
      8 => string 'Moderator forum 8'
      9 => string 'Member forum 9'

I would like to write a script that, once it hits the `Moderator`-tag, stops looking for the tag and continue with a variable which contains `true` or something alike for which I can tell a user is a Moderator on any form of just a normal member.

 I have been experimenting with `in_array` and `preg_match` but everytime I end up with a `false` result, cause the last item of the array (`Member forum 9`) overwrites the  `true` value of the last but one value (`Moderator forum 8`);