You are here: Re: using html to position results « HTML « IT news, forums, messages
Re: using html to position results

Posted by Toby Inkster on 03/12/06 21:18

patrick_woflian wrote:

> Hey, i have set up a website which allows users to search for other
> members. This code is in php and works fine, however.. to make the
> layout more attractive i was thinking of using html code segments to
> position the results in a table for example.

How about something like this?

print "<table>\n";
while ($row = mysql_fetch_row($result))
{
$class = ($class=='a')?'b':'a';
$line = implode('</td><td>', $row);
$line = "<tr class=\"$class\"><td>$line</td></tr>\n";
}
print "</table>\n";

with this:

<style type="text/css">
TABLE { border: 2px solid; border-collpase: collapse; }
TR.a TD { color: black; background: #eee; border: 1px solid; }
TR.c TD { color: black; background: #ffd; border: 1px solid; }
</style>

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация