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 6809275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:04:00+00:00 2026-05-26T20:04:00+00:00

I am new to PHP and I am having issues pulling this data in..

  • 0

I am new to PHP and I am having issues pulling this data in.. It is finding the records according to the debugger but then for some reason the page comes blank. Can anyone please help me with this for loop to retrieve the fields?, i think this is where the issue is. I tried with and without that while loop (which i think is wrong there) and nothing

 echo '<table class="table_content">
             <tr>
                 <td class="td_order" colspan="3" width="800px">
              Descriptions                  </td>
           </tr><tr>';

    for($counter = 0; $row2 = mysql_fetch_row($result2); $counter++)
                  {

                   while ($row2 = mysql_fetch_assoc($result)) {
                          $_name = $row["_name"];
                          $_image = $row["_image"];
                          $_disc = $row["_disc"];
                      }
                        print("<td valign='top' width='230px' height='300px'>");
                        print("<p style='font-size:18px; color:blue; padding:0;'>$_name</p>");
                        print("<img class='custom' alt='' src='$_image'/>");
                        print("<p>$_disc</p>");
                       print('</td>');
                    }
                  }

           echo '</tr></table> ';

I think I am doing something wrong with this logic for the loop, I have tried several things.. but nothing… I would appreciate your help.

PS: The connections works, the query works.. The data being retrieve is as foollow

_name        _image                _disc   
Benjamin    images/benjamin.jpg    He's a great person
Jairo       images/jairo.jpg       Jairo has experience as a civil engineer..
  • 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-26T20:04:01+00:00Added an answer on May 26, 2026 at 8:04 pm

    Remove the for and while loop and change it with ;

    while($row = mysql_fetch_array( $result )){
       $_name = $row["_name"];
       $_image = $row["_image"];
       $_disc = $row["_disc"];
       ..
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I'm having some serious issues here. I'm new to this site, and new
I've got a new site setup using CMSMadeSimple (PHP based) but I'm having problems
I am making get request in PHP but the parser is having issues. I
I am new to codeigniter and I am having some issues loading a model
Having some issues with this search engine I am trying to put together. I'll
I'm having some serious problems with the PHP Data Object functions. I'm trying to
I'm having some issues with the StdClass() object in PHP.. I'm using it to
Just migrated to a new machine and having issues. Note: This is a Windows
I am having issues with storing JSON data to sqlite. This is the code
I'm having trouble translating a subroutine from Perl to PHP (I'm new to Perl).

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.