0

Hello World,
I have a problem.

I want show 2 images or 2 link videos or 1 images 1 link videos together but image/videos not appear, because 2 difference class.

class "img1" and "img2"

#image 
<img alt="" title="" class="img1 or img2" src="images/<?php echo $vx->picture?>">

#video
<a href="http://www.youtube.com/watch?v=<?php echo $vx->video?>" class="img1 or img2"></a>

This code

  <div class="tile tile-01 thumb">
          <div class="tile-nav flipX">
          <?php 
         $yt= mysql_query("Select * from foto ORDER BY  RAND() DESC limit 0,2"); 
         while ($vx = mysql_fetch_object($yt)) { ?>
            <img alt="" title="" class="img1" src="images/<?php echo $vx->picture?>">

         <?php } ?>
          </div>
        </div>

I'm confused, I've been looking for does not work :(

Edited by Bedhoel

3
Contributors
2
Replies
25
Views
3 Years
Discussion Span
Last Post by Taywin
0

you must have column in table foto that its vidoe or image. Use if condtion based on that column value to chose your html code

0

How about declare a variable counter and assign it to 1. Then inside the while loop right behind the class="img#", echo the counter value instead of hard-code the number?

Edited by Taywin

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.