Hi I would like to ask if there is a methode to clear the blank space on a php page.
The exact problem is that I create a querry to a DB and when the table has some fields empty I get a blank space.
I need to fix that so the blank space dispeare.
PEASE HELP
MARIO
Clear blank space at the end of a table ???
Moderator: General Moderators
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
In the case of a blank field, make the content of the cell to be   ; instead of the field content. I mean something like this:
-- Scorphus
Code: Select all
<table>
<tr>
<td><?php echo (empty($row['id']) ? '  ;' : $row['id']); ?></td>
</tr>
</table>HI
I think my question is not clear look here is a link maybe this way it become more clear.
the last info I get from my DB is the one I show, but I get a lot of blank space in the end of the table, thi 'cause I only show the fields that has info in the DB, if all the fields had info the tahle will be full but in this case no.
The link is: http://www.jahvmcgregor.com.co/temporal/1.htm
HELP IT'S BECOMING A PROBLEM FOR ME
I think my question is not clear look here is a link maybe this way it become more clear.
the last info I get from my DB is the one I show, but I get a lot of blank space in the end of the table, thi 'cause I only show the fields that has info in the DB, if all the fields had info the tahle will be full but in this case no.
The link is: http://www.jahvmcgregor.com.co/temporal/1.htm
HELP IT'S BECOMING A PROBLEM FOR ME
- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm
Showing some code almost always helps too.
It looks like you are outputting empty rows. You may need to use a function like mysql_num_rows to figure out how many rows you have. You might also use LIMIT in your SQL to limit how many rows are returned. You'll need to use LIMIT if your going to do any paging of the data.
It looks like you are outputting empty rows. You may need to use a function like mysql_num_rows to figure out how many rows you have. You might also use LIMIT in your SQL to limit how many rows are returned. You'll need to use LIMIT if your going to do any paging of the data.