title: Add PHP script in img src tag with current data-parameters
body: <p>I have a php script which displays all photos from folder dir and I need to include an html tag that applies given data-parameters.
  the php code is:</p>
  
  <pre><code>?php
  
  $directory = "images/*/";
  
  
  $images = glob("" . $directory . "*.png" );
  
  $imgs = '';
  
  foreach($images as $image){ $imgs[] = "$image"; }
  
  shuffle($imgs);
  
  
  $imgs = array_slice($imgs, 0, 20);
  
  
  foreach ($imgs as $img) {
     echo "&lt;img src='$img' /&gt; ";
    }
  
  ?&gt;
  </code></pre>
  
  <p>and I need to put this in html tag as img src:</p>
  
  <pre><code>&lt;img src="" title="Ring" data-parameters='{"zChangeable": true, "x": 215, "y": 200, "colors": "#000000", "removable": true, "draggable": true, "rotatable": true, "resizable": true, "price": 10, "boundingBox": "Base", "autoCenter": true}' /&gt;
  </code></pre>
  
  <p>I tried instead of  echo " create new var with value $img and use  but that gives me me only one image</p>