title: looping array with key for a modal/div
body: <p>I've created a list of items that have an icon next to them where I'm trying to click the icon and have it populate a modal that contains the information, and this will be used to delete/edit things as I add to them.</p>
  
  <p>The issue is that now when I click the icon it doesn't seem to pop up any modal at all. Before I added the <code>$key</code> it at least triggered a modal but each one had the info for the first item in the array. Now I"m simply trying to add a key to the necessary item so that if I click the icon I get a modal with only the info for that item.</p>
  
  <p>What am I doing wrong here?</p>
  
  <pre><code>@foreach($nodes as $key =&gt; $node)   
      &lt;div class="uk-width-1-1"&gt;
          &lt;div class="uk-grid "&gt;
              &lt;div class="uk-width-2-6"&gt;
              {{$node-&gt;id}} - {{$node-&gt;name}}
              &lt;/div&gt;
              &lt;div class="uk-width-2-6 "&gt;
                  &lt;span&gt;{{ $node-&gt;comment }}&lt;/span&gt; 
                   &lt;a href="#edit-edit-modal{{ $key }}" data-uk-modal&gt;&lt;span class="uk-icon-button"&gt;&lt;/span&gt;&lt;/a&gt; 
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  @endforeach
  
  
  @foreach($nodes as $key =&gt; $node)
  &lt;div id="edit-edit-modal{{ $key }}" class="uk-modal"&gt;  
      &lt;div class="uk-modal-dialog"&gt;
              &lt;div class="uk-width-1-1"&gt;
                  &lt;div class="uk-grid uk-grid-small"&gt;
                      &lt;div class="uk-width-2-10"&gt;
                      {{$node-&gt;id}} - {{$node-&gt;name}}
                      &lt;/div&gt;
                      &lt;div class="uk-width-2-10 testComment"&gt;
                          &lt;span&gt;{{ $node-&gt;comment }}&lt;/span&gt; 
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @endforeach
  </code></pre>