Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4623428
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:59:09+00:00 2026-05-22T02:59:09+00:00

i want to display the mysql’s fetched results with php and html in unordered

  • 0

i want to display the mysql’s fetched results with php and html in unordered list and list format as like http://www.miniclip.com/games/en/. you can see in the all games categories in the footer in alphabetical order. the same requirement i do have. i guess i have written the logic its working fine. but i am unable to represent it properly. you can see in the following link above the footer. http://www.playtoongames.com/play1…

code:

<?php
$gameQuery = mysql_query ("SELECT name, LEFT(name, 1) AS first_char FROM games WHERE UPPER(name) BETWEEN 'A' AND 'Z' OR name BETWEEN '0' AND '9' ORDER BY name");
$current_char = '';
   while ($gameRow = mysql_fetch_assoc($gameQuery)){
     if ($_SESSION['lang'] == 'fr'){
         $description = $gameRow['description_fr'];
     }else{
   $description = $gameRow['description'];
 }
?>

<div style='float:left' title="<img src='<?php echo $gameRow['sitePath'];?>games/images/<?php echo $gameRow['img_100x75'];?>' width='230' height='112' class='thumb' alt='<?php echo $gameRow['name'];?>'/>" class='tooltip'>

                     <ul>
                     <li>
     <a href='<?php echo $gameRow['sitePath'];?>play/<?php echo str_replace(' ','_',$gameRow['name']);?>'><?php echo $gameRow['name'];?></a>
                     </li> 
                      </ul>
</div>

can anybody look into this…

Regards,
sam.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:59:10+00:00Added an answer on May 22, 2026 at 2:59 am

    Well, I think the key is that there are 6 columns, which just means you’ll need to break your array into 6 different parts.

    Here’s some psuedocode:

    $pArr = $from_sql_array; // I'll let you take care of that.
    $itmCount = count($pArr);
    $itmsPerCol = ceil($itmCount / 6.0);
    for ($ii=0; $ii < 6; $ii++)
    {
      $pCol = array_slice($pArr, $itmsPerCol * $ii, $itmsPerCol);
      echo '<ul class="floatleft"><li>'.implode("</li>\n<li>",$pCol).'</li></ul>';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After echoing a list of results from PHP/Mysql. I want to display the results
i want to retrieve image stored in mysql as path using php and display
Hy. I want to display pictures from my mysql data base. Php Code: <body>
I want to display data in my own format from Mysql database connecting through
I'm using PHP/MySQL to make a website that displays race results. I want to
I have this mysql tables I want to display with jqgrid. The problem appears
I want to display the time and date of updated row from MySQL to
I have db with this table (TableToDo): http://goo.gl/NlTEk I want display all records in
Using mysql I want to display two rows values in to single value ID
I have a mySql database i want to display only 10 words from its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.