Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try</p> <pre><code>&lt;div class="image-zoom" rel="lightbox" id="gallery"&gt; &lt;div id="album1" style="margin-right:18px;" rel="lightbox"&gt; &lt;?php if (isset($albums[0])) { $i = 1; foreach ($albums[0]['photos'] as $photo) { if ($i == 1) { ?&gt; &lt;a href="&lt;?= $photo ?&gt;" rel="lightbox"&gt; &lt;img src="&lt;?= $photo ?&gt;" width="214" height="160" /&gt; &lt;/a&gt; &lt;div class="zoom-magnifier" id="gallery"&gt; &lt;a href="&lt;?= $photo ?&gt;" rel="lightbox"&gt; &lt;img src="&lt;?php echo Yii::app()-&gt;theme-&gt;baseUrl; ?&gt;/images/zoom-icon.png" id="zoom"/&gt; &lt;/a&gt; &lt;div id="more-text" align="left" &gt;&lt;?=$albums[0]['title']?&gt;&lt;/div&gt; &lt;/div&gt; &lt;?php } else { ?&gt; &lt;a href="&lt;?= $photo ?&gt;" rel="lightbox"&gt;&lt;/a&gt; &lt;?php } $i++; } } ?&gt; &lt;/div&gt; &lt;div id="album2" rel="lightbox"&gt; &lt;?php foreach (array(1, 0) as $album_id) { if (isset($albums[$album_id])) { $i = 1; foreach ($albums[$album_id]['photos'] as $photo) { if ($i == 1) { ?&gt; &lt;a href="&lt;?= $photo ?&gt;" rel="lightbox"&gt; &lt;img src="&lt;?= $photo ?&gt;" width="214" height="160" /&gt; &lt;/a&gt; &lt;div class="zoom-magnifier"&gt; &lt;a href="&lt;?= $photo ?&gt;" rel="lightbox"&gt; &lt;img src="&lt;?php echo Yii::app()-&gt;theme-&gt;baseUrl; ?&gt;/images/zoom-icon.png" id="zoom1"/&gt; &lt;/a&gt; &lt;div id="more-text2" class="more-txt-link"&gt;&lt;?=$albums[$album_id]['title']?&gt;&lt;/div&gt; &lt;/div&gt; &lt;?php } else { ?&gt; &lt;a href="&lt;?= $photo ?&gt;" rel="lightbox"&gt;&lt;/a&gt; &lt;?php } $i++; } break; } } ?&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload