title: Pass Arrays from PHP file to JS file
body: <p>I would like to pass an array I have in my PHP file to another file that is written in java script.
  This is my array:</p>
  
  <pre><code>$pictures = array(
  "1" =&gt; array("caption" =&gt; "1920x1200px", "tag" =&gt; "wallpaper", "link" =&gt; "#"),
  );
  </code></pre>
  
  <p>And in my java script file this is the place where I want to call the array:
  (At the place where they shall be in the code I wrote TAG, LINK and CAPTION. 
  Sry if this is a stupid question, but as you see, I have no idea about PHP and java script)</p>
  
  <pre><code>F.helpers.title = {
      beforeShow: function (opts) {
          var text = F.current.title,
              type = opts.type,
              title,
              target;
  
          if (!isString(text) || $.trim(text) === '') {
              return;
          }
  
          title = $('&lt;div class="fancybox-title fancybox-title-' + type + '-wrap"&gt;&lt;h1&gt;' + text + '&lt;/h1&gt;&lt;p&gt;CAPTION&lt;/p&gt;&lt;/div&gt;&lt;div class="fancybox-title fancydownload" &gt;&lt;a href="LINK"&gt;&lt;img src="../../../slider/img/download.png" alt=""/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="fancybox-title fancytag"&gt;&lt;h2&gt;TAG&lt;/h2&gt;&lt;/div&gt;');
  
          switch (type) {
              case 'inside':
                  target = F.skin;
              break;
  
              case 'outside':
                  target = F.wrap;
              break;
  
              case 'over':
                  target = F.inner;
              break;
  
              default: // 'float'
                  target = F.skin;
  
                  title
                      .appendTo('body')
                      .width(title.width()) //This helps for some browsers
                      .wrapInner('&lt;span class="child"&gt;&lt;/span&gt;');
  
                      //Increase bottom margin so this title will also fit into viewport
                      F.current.margin[2] += Math.abs(     getScalar(title.css('margin-bottom')) );
              break;
          }
  
          if (opts.position === 'top') {
              title.prependTo(target);
  
          } else {
              title.appendTo(target);
          }
      }
  };
  </code></pre>