Permanently passing variable to function
<p>Can someone help me simplify this code? Is there a way I can permanently pass $the_campus to is_campus() without using a global scope? $the_campus is pulling from a database and the value changes, but the variable is always called $the_campus.</p>

<p>Thanks!</p>

<pre><code> $the_campus = $search_term['campus'];
    function is_campus($the_campus, $selected_campus) {
        if ( $selected_campus == $the_campus ) {
            echo 'selected';
        }
    }

    &lt;?php is_campus($the_campus, 'university-of-minnesota-tc'); ?&gt;
    &lt;?php is_campus($the_campus, 'university-of-wisconsin'); ?&gt;
    &lt;?php is_campus($the_campus, 'university-of-chicago'); ?&gt;
</code></pre>
