Create Tables Dynamically?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
mikedev
Forum Newbie
Posts: 1
Joined: Mon May 01, 2006 11:14 pm

Create Tables Dynamically?

Post by mikedev »

Hi everyone!

I am wondering how I can create a table dynamically based on wether a recordset is full or not.

Here's the details:
On this page I have php calling data from a mysql database and separating it into two recordsets. One recordset I have dynamically loading into a table with php. But for the other recordset I want to dynamically create a table to load the data in only if the recordset has something in it. Otherwise it won't create the table.

How would I do this? Can I use php to dynamically create tables? Or does html have a way to create tables dynamically? DHTML?

Any thought you have about this would be greatly appreciated!

THANKS!

-Mike :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

use an if() in combination with say empty() to analyze the record set and create the logic you wish.
Post Reply