css - Show php image field only uploaded field -


i have 3 image field

<?php echo $row['thumbnail1']; ?> <?php echo $row['thumbnail2']; ?> <?php echo $row['thumbnail3']; ?> 

if there 1 exp thumbnail1 have image..

how show

and how if image 1 , 2 have data..

please how show php query if there 1 or 2 , 3 image upload

this css style

 <div class="col-xs-12">     <a href="#"><img src="#" class="w-full"></a>    </div>  <!-- if 2 image available uploaded use -->                                                                           <div class="col-xs-4">       <a href="#"><img src="#" class="w-full"></a>  </div>  <div class="col-xs-4">       <a href="#"><img src="#" class="w-full"></a>  </div>  <!-- if all/3 image available uploaded use -->          <div class="col-xs-4">      <a href="#"><img src="#" class="w-full"></a>  </div>  <div class="col-xs-4">       <a href="#"><img src="#" class="w-full"></a>  </div>    <div class="col-xs-4">        <a href="#"><img src="#" class="w-full"></a>  </div> </div> 

dsa sdas

replace old code (someone edited have re writtent code again) :

<?php if(isset($row['thumbnail1'])) { ?>  <div class="col-xs-12">     <a href="#"><img src="#" class="w-full"></a>    </div> <?php } ?> <!-- if 2 image available uploaded use -->                                                                         <?php if(isset($row['thumbnail2'])) { ?>  <div class="col-xs-4">       <a href="#"><img src="#" class="w-full"></a>  </div>  <div class="col-xs-4">       <a href="#"><img src="#" class="w-full"></a>  </div> <?php } ?> <!-- if all/3 image available uploaded use -->         <?php if(isset($row['thumbnail3'])) { ?> <div class="col-xs-4">      <a href="#"><img src="#" class="w-full"></a>  </div>  <div class="col-xs-4">       <a href="#"><img src="#" class="w-full"></a>  </div>    <div class="col-xs-4">        <a href="#"><img src="#" class="w-full"></a>  </div> <?php } ?> 

give me update, if have tested.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -