title: ID for each item JavaScript and PHP
body: <pre><code>   &lt;a class="glyphicon glyphicon-heart-empty" style="font-size: 50px;color: red" id="'.$item['id'].'" onclick="changeH()"&gt;&lt;/a&gt;
     &lt;script type="text/javascript"&gt;
         function changeH() {
             if (document.getElementById('&lt;?php echo $item['id'];?&gt;').className == "glyphicon glyphicon-heart")
                 document.getElementById('&lt;?php echo $item['id'];?&gt;').className = "glyphicon glyphicon-heart-empty";
             else {
                 document.getElementById('&lt;?php echo $item['id'];?&gt;').className = "glyphicon glyphicon-heart";
             }
         }
     &lt;/script&gt;
  </code></pre>
  
  <p>I want to display an empty heart in each item AND when I cliked on one, it will display a full heart. It works for me only when I make a character or integer id but no with PHP.</p>
  
  <p>Help me Please !!! </p>