PHP: how to return the right stuff
<p>In my function I have more variables:</p>

<pre><code>        $disallowGallery = 1;
        $disallowFriend = 1;
        $disallowWall = 1;
        $disallowPM = 1;
        $disallowStatusComment = 1;
</code></pre>

<p>Now, i have a $check parameter. If it contains 'Gallery' the function should return the $disallowGallery variable. If it contains 'Friend' it should return the $disallowFriend variable.</p>

<p>I can do this myself with alot of if else statement / or an switch. But does there exist a more effective/simpler way?</p>
