NYCPHP Meetup

NYPHP.org

[nycphp-talk] Q) learning php - drawing table border around em pty<td>

Shawn Lawyer shawn at shawnlawyer.com
Tue Feb 10 18:07:49 EST 2004


I agree with Aaron!
If you just put this <img src="spacer.gif" width="1" height="1" border="0"
/>
in place of the null fields it'll solve your problem. An image with height
or width of 1 won't show
any errors on the page if the image isn't where you specify so this way ends
up being pretty portable.
For a small hack it works for me.

Shawn

----- Original Message ----- 
From: "Aaron Fischer" <agfische at email.smith.edu>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Tuesday, February 10, 2004 12:45 PM
Subject: Re: [nycphp-talk] Q) learning php - drawing table border around em
pty<td>


> Another option is popping in an <img> tag pointing to your 1x1
> transparent spacer image instead of the &nbsp;.  This is also a good
> question to post to the front end mailing list
> <front-end at lists.nyphp.org>.
>
> Hmm, email program is acting funky, apologies if this is a duplicate
> post.
>
> -Aaron
>
> On Feb 10, 2004, at 12:19 PM, Chris Bielanski wrote:
>
> > What browser are you viewing in? AFAIK the &nbsp; should do the
> > trick...
> >
> >> -----Original Message-----
> >> From: Bill Wolf [mailto:wiw at nyc.rr.com]
> >> Sent: Tuesday, February 10, 2004 12:14 PM
> >> To: talk at lists.nyphp.org
> >> Subject: [nycphp-talk] Q) learning php - drawing table border around
> >> empty <td>
> >>
> >>
> >> I have a question about populating a table with values from a
> >> query that
> >> sometimes are null.
> >>
> >> When the table's drawn, no border is drawn around those <td>
> >> elements which
> >> looks awkward.  I've tried doing some things where I force in
> >> "&nbsp;" into
> >> the query results but it doesn't seem to take take.  Suggestions?
> >>
> >>
> >>
> >> $result = mysql_query("select show_id, month, day, year,
> >> location, details ,
> >> venue
> >>                       from $database_table order by year,
> >> month, day",$db)
> >>                       or die_now("<h2>Could not select shows</h2>" );
> >> ...
> >>
> >>     while($row = mysql_fetch_array($result)) {
> >>        $the_id = $row["show_id"];
> >>        $the_month = $row["month"];
> >>        $the_day = $row["day"];
> >>        $the_year = $row["year"];
> >>        $the_location = $row["location"];
> >>        $the_details = $row["details"];
> >>        $the_venue = $row["venue"];
> >>
> >> ...
> >>
> >>      // shows
> >>      echo("\t<tr align='left'
> >> valign='top'>\n\t\t<td><b>$the_month" . "/" .
> >> "$the_day" . "/" . "$the_year" . "<b></td>\n");
> >>
> >> _______________________________________________
> >> talk mailing list
> >> talk at lists.nyphp.org
> >> http://lists.nyphp.org/mailman/listinfo/talk
> >>
> > _______________________________________________
> > talk mailing list
> > talk at lists.nyphp.org
> > http://lists.nyphp.org/mailman/listinfo/talk
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>
>





More information about the talk mailing list