Connecting Tech Pros Worldwide Forums | Help | Site Map

How to farmat php-generated table

deko
Guest
 
Posts: n/a
#1: Jul 17 '05
the font size declaration seems to be ignored. Is it possible to set format for
tables generated with php?

<?php

echo "<table border=1 font size=8>";
echo '<tr><th font size=8>Date</th>
<th>IP Address</th>
<th>Operating System</th>
<th>Browser</th>
<th>Referring Page</th>
<tr>';

?>



deko
Guest
 
Posts: n/a
#2: Jul 17 '05

re: How to farmat php-generated table


tables suck
"deko" <dje422@hotmail.com> wrote in message
news:TKt6c.26031$gj2.11288@newssvr29.news.prodigy. com...[color=blue]
> the font size declaration seems to be ignored. Is it possible to set format[/color]
for[color=blue]
> tables generated with php?
>
> <?php
>
> echo "<table border=1 font size=8>";
> echo '<tr><th font size=8>Date</th>
> <th>IP Address</th>
> <th>Operating System</th>
> <th>Browser</th>
> <th>Referring Page</th>
> <tr>';
>
> ?>
>
>[/color]


Geoff Berrow
Guest
 
Posts: n/a
#3: Jul 17 '05

re: How to farmat php-generated table


I noticed that Message-ID:
<TKt6c.26031$gj2.11288@newssvr29.news.prodigy.co m> from deko contained
the following:
[color=blue]
>the font size declaration seems to be ignored. Is it possible to set format for
>tables generated with php?
>
><?php
>
> echo "<table border=1 font size=8>";[/color]

Nothing to do with PHP. That's not valid html

Use proper html markup or CSS

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Marcin Dobrucki
Guest
 
Posts: n/a
#4: Jul 17 '05

re: How to farmat php-generated table



The 'font' attribute in html is deprecated. For what you want to do,
try something like this:

<table border="1">
<tr style="font-size: 8em;">
<th>...</th>
<th>...</th>
....

BTW, if you'd bother to read any documentation, you'd notice you are
talking about html not php, and also notice that font property
(deprecated or not) can't be used as an attribute for tables (its a tag,
not an attribute).

/Marcin

deko wrote:[color=blue]
> tables suck
> "deko" <dje422@hotmail.com> wrote in message
> news:TKt6c.26031$gj2.11288@newssvr29.news.prodigy. com...
>[color=green]
>>the font size declaration seems to be ignored. Is it possible to set format[/color]
>
> for
>[color=green]
>>tables generated with php?
>>
>><?php
>>
>> echo "<table border=1 font size=8>";
>> echo '<tr><th font size=8>Date</th>
>> <th>IP Address</th>
>> <th>Operating System</th>
>> <th>Browser</th>
>> <th>Referring Page</th>
>> <tr>';
>>
>>?>
>>
>>[/color]
>
>[/color]

Garp
Guest
 
Posts: n/a
#5: Jul 17 '05

re: How to farmat php-generated table



"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
news:f68l50l7n2dtlbif52kq9aj99djheb7pgs@4ax.com...[color=blue]
> I noticed that Message-ID:
> <TKt6c.26031$gj2.11288@newssvr29.news.prodigy.co m> from deko contained
> the following:
>[color=green]
> >the font size declaration seems to be ignored. Is it possible to set[/color][/color]
format for[color=blue][color=green]
> >tables generated with php?
> >
> ><?php
> >
> > echo "<table border=1 font size=8>";[/color]
>
> Nothing to do with PHP. That's not valid html
>
> Use proper html markup or CSS
>[/color]

While it is startlingly off-topic, I'd prefer we point these people in the
right direction rather than chew them out.

deko, formatting HTML (see www.w3c.org to understand why your solution
doesn't work) using raw PHP is slow at best, irritating at worst. Delegate
the presentation to something like the Smarty template library
(http://smarty.php.net/) and use PHP's power to get the data to populate the
templates with.

HTH

Garp


Geoff Berrow
Guest
 
Posts: n/a
#6: Jul 17 '05

re: How to farmat php-generated table


I noticed that Message-ID:
<s4Y6c.21375$yx1.473322606@news-text.cableinet.net> from Garp contained
the following:
[color=blue][color=green][color=darkred]
>> > echo "<table border=1 font size=8>";[/color]
>>
>> Nothing to do with PHP. That's not valid html
>>
>> Use proper html markup or CSS
>>[/color]
>
>While it is startlingly off-topic, I'd prefer we point these people in the
>right direction rather than chew them out.[/color]

Huh? In what way was that chewing him out? Not my business if he wants
to use PHP to write html, he may have perfectly valid reasons for doing
so.

He wanted to know why it wouldn't work. I told him.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Closed Thread