Connecting Tech Pros Worldwide Help | Site Map

How to farmat php-generated table

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 04:17 AM
deko
Guest
 
Posts: n/a
Default How to farmat php-generated table

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>';

?>



  #2  
Old July 17th, 2005, 04:17 AM
deko
Guest
 
Posts: n/a
Default 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]


  #3  
Old July 17th, 2005, 04:18 AM
Geoff Berrow
Guest
 
Posts: n/a
Default 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/
  #4  
Old July 17th, 2005, 04:18 AM
Marcin Dobrucki
Guest
 
Posts: n/a
Default 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]

  #5  
Old July 17th, 2005, 04:19 AM
Garp
Guest
 
Posts: n/a
Default 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


  #6  
Old July 17th, 2005, 04:19 AM
Geoff Berrow
Guest
 
Posts: n/a
Default 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/
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.