Jump to content

[SOLVED] For Ech problem.


Chevy

Recommended Posts

  $trophies = explode(",", $site_array[trophies]);

echo '<center><br><font size="4"><b><u>Trophies</u></b></font><br><table width="250><tr>';

  if ($site_array['trophies'] == NULL){
      echo '<td align="center"><font color="red"><b>'.$site_array['name'].' has no trophies!</b></font></td>';
  }

  $i = 0;
    foreach($trophies as $trophy){
         $trophy_select = mysql_query("SELECT * FROM `trophies` WHERE `shortname`='$trophy'");
         $trophy_array = mysql_fetch_array($trophy_select);
            $i = $i+1;
               echo '<td align="center"><img src="'.$trophy_array['image'].'"><br><b>'.$trophy_array['name'].'</b></td>';

                   if ($i == "2"){
                      echo '</tr><tr>';
                      $i = 0;
                   }
     }

 

That code only puts out one thing when I have 3 in the database field

 

My DB for that one site looks like this...

gold,feautured,friendliest

 

It only is displaying Gold

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.