Generate links based on whether or not a user downloaded a file
<p>I need to generate a link next to a file name, based on whether or not a user downloaded that file.</p>

<p>So here, <code>$done</code> contains the <code>id</code> of the file that a user downloaded. It comes from a database.</p>

<p>My problem is, how can I assign several values to <code>$done</code> and then run the check? So <code>$done</code> will be, say, <code>1, 3, 5</code> and then run those values tru the while loop? In this case, the viewer will receive the downloded message for <code>ids</code> <code>1, 3, 5</code></p>

<pre><code>&lt;?php
$i = 1;

$done = 5;//How can I assign multiple values to done and then run the check?

while ($i &lt;= 10) {
    echo $i;
    echo ($done == $i ? ' You\'ve already downloaded this &lt;br&gt;' : ' You have not downloaded this &lt;br&gt;');
    $i++;
}
?&gt;
</code></pre>
