I want to enter dynamic value in switch case
<p>I want dynamic value of switch cases as shown below. please give me a proper solution.</p>

<pre><code>switch($intr_val)
{
        $i=0;
        while($data=mysql_fetch_array($result_comm_name))
        {
            case '$data[name]'  :   
                    $intr_no = $i;
            break;
            $i++;
    }
}
</code></pre>
