Best way to find a string in a PHP array? : <p>If I have an array that contains some strings like so</p>

<pre><code>$roleNames = ['sales_agent', 'admin'];
</code></pre>

<p>And I want to check if that array contains the string 'sales_agent', what would be the best way to go about this with PHP?</p>

<p>Ideally I would like to have the check return a boolean value.</p>
