Jump to content

having some trouble


justinh

Recommended Posts

$count = mysql_num_rows($result);
      while($hey = mysql_fetch_array($result)){

         if ($count > 2){
                       for($count; $count = 0; $count--){
      
                       if ($count = 1){
      
                       echo $hey['firstname']."<a href=\"moreinfo.php\">[...]</a><br>";
                        } else {
            
                      echo $hey['firstname']."<br>";

                               }
                                                   }
            } else {
            echo $hey['firstname']."<br>";
            
            }
                                                 }

      echo "</td>";

 

Trying to get if $count has more than 3 results, It displays 2 results and at the end adds [...] to see more results.

 

Anyone have any suggestions?

 

Link to comment
https://forums.phpfreaks.com/topic/132313-having-some-trouble/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.