Checking if values equal true in PHP
<p>How can I check if each value in the variable <code>$c = 90,89,78,88;</code> equal true I think you call it an array in my script one at a time?</p>

<p>This part checks the variable.</p>

<pre><code>if($cat['id'] == $c){
    $url = $parent_url . $cat['url'];
    echo '&lt;a href="' . $url . '" title="' . $cat['category'] . '"&gt;' . $cat['category'] . '&lt;/a&gt;';            
}
</code></pre>

<p>Here is the PHP code.</p>

<pre><code>$c = 90,89,78,88;

function make_list ($parent = 0, $parent_url = '') {
    global $link;
    global $c;

    foreach ($parent as $id =&gt; $cat) {

        if($cat['id'] == $c){
            $url = $parent_url . $cat['url'];
            echo '&lt;a href="' . $url . '" title="' . $cat['category'] . '"&gt;' . $cat['category'] . '&lt;/a&gt;';            
        }

        $url = $parent_url . $cat['url'];

        if (isset($link[$id])) {
            make_list($link[$id], $url); // $url adds url value to sub categories
        }               
    }       
}
</code></pre>
