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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:16:06+00:00 2026-06-08T14:16:06+00:00

I am trying to generate a table with rows but the way I am

  • 0

I am trying to generate a table with rows but the way I am doing it seems wrong, it just creates a table for each item.

if ($favorite_post_ids):
        $favorite_post_ids = array_reverse($favorite_post_ids);
        foreach ($favorite_post_ids as $post_id) {
            $p = get_post($post_id);
            echo "<table width=\"100%\" border=\"5\">\n"; 
            echo "<tr>\n"; 
            echo "<td>" . get_the_post_thumbnail($post_id, array(55,55), array('class' => 'fav-thumbs')) . "</td>\n"; 
            echo "<td><a href='".get_permalink($post_id)."' title='". $p->post_title ."'><span class='fav-title'>" . $p->post_title . "</span></a></td>\n"; 
            echo "<td>";
            wpfp_remove_favorite_link($post_id);
            echo "</td>\n";
            echo "</tr>\n"; 
            echo "</table>\n";

Little help please.

  • 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-06-08T14:16:07+00:00Added an answer on June 8, 2026 at 2:16 pm

    echo "<table width=\"100%\" border=\"5\">\n"; //this needs to only happen once before foreach.

    echo "</table>\n"; //this needs to happen only once at the end.

    And you want to use $html variable of some sort if you want the page to load faster. (As long as your not trying to generate a large table.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to generate a big table of consecutive numbers in MySQL. I just
Im trying to count the number of rows in the table and generate random
I've been trying to generate a table with n number of rows. Being used
I'm trying to generate a table of contents from a block of HTML (not
I'm trying to generate a dynamic table using CSS: <html> <head> <style> div.el1, div.el2
I am trying to generate a query that selects all from a user table
I'm trying to determine what would be the most efficient/recommended way of doing this--I
i'm trying to make this form sticky but it's not doing. What i'm trying
I have a table I am trying to generate reports from. Its basically a
I am trying to insert 2 rows into the same table. The first will

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.