If you're creating an array yourself and then using in_array to search it, consider setting the keys of the array and using isset instead since it's much faster.
<?php
$slow = array('apple', 'banana', 'orange');
if (in_array('banana', $slow))
print('Found it!');
$fast = array('apple' => 'apple', 'banana' => 'banana', 'orange' => 'orange');
if (isset($fast['banana']))
print('Found it!');
?>