title: Jquery Supersized! plugin with dynamic images path
body: <p>I have a problem with the supersized jquery plugin, i was looking around about similar questions in this forum, i found an answer and try to adapt it to my issue, but is doesn't work, because i am a kind of new in php, so maybe someone could help me to adjust my function.</p>
  
  <p>I am working on a dynamic website, I don't know neither the number, nor the title of the images.</p>
  
  <p>I have several functions to call them that works but i don't manage to regroup them into a function that i could insert into the supersized! plugin</p>
  
  <p>Here are my different elements :
  this would always be the same configuration :</p>
  
  <p>First single image : </p>
  
  <pre><code>    &lt;img src='/cspdocs/exhibition/images/&lt;?php echo $expo['pic'];?&gt;'/&gt;
  </code></pre>
  
  <p>for the others i need to use a loop foreach</p>
  
  <p>second group of images :</p>
  
  <pre><code>    &lt;?php foreach (getExpoViews($id_expo) AS $id_view) { ?&gt;
      &lt;img src='/cspdocs/exhibition/images/&lt;?php echo getExpoViewImage($id_view)?&gt;' title : '&lt;?php echo $expo['name']'?&gt; /&gt;   
      &lt;?php }; ?&gt;
  </code></pre>
  
  <p>third goup of images :</p>
  
  <pre><code>    &lt;?php foreach (getExpoArtworks($id_expo) AS $id_artwork) {?&gt;
      &lt;img src="/cspdocs/artwork/images/&lt;?php echo getArtworkThumbnail($id_artwork); ?&gt;" title="&lt;?php echo getArtistFullName(getArtworkArtist($id_artwork));?&gt;" /&gt;
      &lt;?php }; ?&gt;
  </code></pre>
  
  <p>I don't know how to regroup them,
  I start something like that for the second group of images
  but it doesn't work :</p>
  
  <pre><code>    &lt;?php 
      function getAllExpoView($path) {
      if (getExpoViews($id_expo)!='') {
        foreach (getExpoViews($id_expo) AS $id_view) { 
        $images= "{image : '/cspdocs/exhibition/images/'".getExpoViewImage($id_view)."', title : '".$expo['name']."', thumb :'/cspdocs/exhibition/images/'".getExpoViewImage($id_view)."',url :  ''},";   
        }; 
       return $images ;
   }; 
      }; 
     ?&gt;
  </code></pre>
  
  <p>the goal is to replace the path here, the first image is ok, it is for my second and third groups :</p>
  
  <pre><code>    jQuery(function($){
  
              $.supersized({
                              slides                  :   [           // Slideshow Images
                                                      {image : '/cspdocs/exhibition/images/&lt;?php echo $expo['pic'];?&gt;', title : '&lt;?php echo $expo['name']; ?&gt;', thumb : '/cspdocs/exhibition/images/&lt;?php echo $expo['pic'];?&gt;', url : '&lt;?php echo $link;?&gt;'},
                                                      {image : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.2/slides/kazvan-2.jpg', title : 'Image Credit: Maria Kazvan', thumb : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.2/thumbs/kazvan-2.jpg', url : '&lt;?php echo $link;?&gt;'}
                                              ]
          });
     });
  </code></pre>
  
  <p>here the link to the pre-prod website:</p>
  
  <p><a href="http://jeromesohier.curator-studio.com" rel="nofollow">http://jeromesohier.curator-studio.com</a></p>