title: Slick Slider is not working with Loop in PHP
body: <p>I am trying to use a slick slider it's working fine outside the loop but not working in foreach loop.
  Here is the code without loop</p>
  
  <pre><code>      &lt;div style="width: 120%; margin: 0 -10%;left: 0;  right:0;"&gt;
        &lt;section class="center slider"&gt;
          &lt;div&gt;
            &lt;img src="http://dev9.hostriplex.com/clearcube/wp-content/uploads/2019/04/CD5014_Front_view.png?text=1"&gt;
          &lt;/div&gt;
          &lt;div&gt;
            &lt;img src="http://dev9.hostriplex.com/clearcube/wp-content/uploads/2019/04/CD5012_Front_view-200.png?text=2"&gt;
          &lt;/div&gt;
          &lt;div&gt;
            &lt;img src="http://dev9.hostriplex.com/clearcube/wp-content/uploads/2019/04/CD5014_rear_view.png?text=3"&gt;
          &lt;/div&gt;
          &lt;div&gt;
            &lt;img src="http://dev9.hostriplex.com/clearcube/wp-content/uploads/2019/04/CD5014_Front_view.png?text=4"&gt;
          &lt;/div&gt;
        &lt;/section&gt;
      &lt;/div&gt;
      &lt;script src="slick.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
   &lt;script type="text/javascript"&gt;
  
       $(document).on('ready', function() {   
  
          $(".center").slick({
          dots: true,
          infinite: true,
          centerMode: true,
          slidesToShow: 3,
          slidesToScroll: 1
        });
  
       });
  
   &lt;/script&gt;
  </code></pre>
  
  <p>It's working perfectly fine.</p>
  
  <p>But when I try to convert it in the loop it stops working. Below is the code with a loop.</p>
  
  <pre><code> &lt;div style="width: 120%; margin: 0 -10%;left: 0;  right:0;"&gt;
   &lt;section class="center slider"&gt;
   &lt;?php foreach ($thumbs_array as $thumbnail) { //Returning 3 iterations
   echo '&lt;div&gt;&lt;img src="' . $thumbnail . '"&gt;&lt;/div&gt;';
   } ?&gt;
  &lt;/section&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I am doing wrong?</p>