NYCPHP Meetup

NYPHP.org

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

Bill Wolf wiw at nyc.rr.com
Tue Feb 10 12:14:17 EST 2004


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");




More information about the talk mailing list