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"

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

<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">
         $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 } ?>

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

Recommended Answers

All 2 Replies

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

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.