How can I make PHP output from SQL have unique names for each element I can access with jQuery?
<p>I'm trying to make simple cms; the code below is index.php.<p></p>

<p>Now I can't find the way to make jquery select each item, because they have the same name.<br>
For example i want to do is: select (on $(.subject)).hover then (a $(.subjectpic)).show<p>
How to make them have their own names? </p>

<pre><code>&lt;?php
if(!$query){
    print "submit error";
}
else {
    while($list=mysql_fetch_array($query)){
        print"
        &lt;div class=\"subjectwrap\"&gt;
                &lt;div class=\"subject\"&gt;$list[subject]&lt;/div&gt;
                &lt;div class=\"subjectpic\"&gt;$list[subjectpic]&lt;/div&gt;
        &lt;/div&gt;
        ";
    }
}   
?&gt;
</code></pre>
