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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:10:30+00:00 2026-05-31T01:10:30+00:00

i use this class for create HTML content http://code.google.com/p/php-class-html-generator/ I try to build a

  • 0

i use this class for create HTML content

http://code.google.com/p/php-class-html-generator/

I try to build a table in this way , but the html result is wrong…

$messalist = array(...);

    $html = htmltag::createElement('table')->id( $attr['id'] );

        foreach($messagelist as $message){
             $html->addElement('tr')
             ->addElement('td')->setText($message['subject'])
             ->addElement('td')->setText($message['from'])
             ->addElement('td')->setText($message['date'])
             ->addElement('td')->setText($message['size']);
        }

echo $html;

How do it in right way?
Thanks

This is generated html:

<table id="messagelist">
    <tr>
    <td>
    <td>
    <td>
    <td>1.91kB</td>23 Feb 11:56 AM</td>To: me@me.com</td>Re: helooo</td></tr>
    <tr>

    <td>
    <td>
    <td>
    <td>1.67kB</td>27 Feb 6:56 AM</td>me@me.com</td>Re: Helloo</td></tr></table>

and this is what i need:

<table id="messagelist">
    <tr>
    <td>1.91kB<td></td>23 Feb 11:56 AM</td><td>To: me@me.com</td><td>Re: helooo</td></tr>
    <tr>
    <td>1.67kB</td><td>27 Feb 6:56 AM</td><td>me@me.com</td><td>Re: Helloo</td></tr></table>
  • 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-31T01:10:32+00:00Added an answer on May 31, 2026 at 1:10 am

    Try:

    foreach($messagelist as $message){
         $tr= $html->addElement('tr');
         $tr->addElement('td')->setText($message['subject']);
         $tr->addElement('td')->setText($message['from']);
         $tr->addElement('td')->setText($message['date']);
         $tr->addElement('td')->setText($message['size']);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to to use this class http://robbyonrails.com/articles/2005/05/11/parsing-a-rss-feed but am not sure where to
Is it possible to change PowerPacks.LineShape smoothingMode? I tried to use this code(a class
I am trying to use the fancybox system described here: http://fearlessflyer.com/2011/01/create-an-awesome-photo-gallery-with-fancybox-and-timthumb/ I can get
I thought WINDOW_SERVICE was supposed to be a constant defined in android.content.Context . http://developer.android.com/reference/android/content/Context.html#WINDOW_SERVICE
I don't have any idea how to use this class in .net. Anyone wants
I use this pseudo-class to make Ajax request to server: function RequestManager(url, params, success,
I tried to use this on my class library mylib.core.data.dll and got a successful
I am trying to use this in my page class. I only just started
I'm trying to use: // this is a BreakHistory class from the ADO.NET Data
I imagine to use XML serialization like this: class Foo { public Foo (string

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.