Re: Text Color

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"<TR><TD>".$myrow["char_name"]."<TD>".$myrow["char_level"]."<TD>".$class["class"]."<TD>".$myrow["kara"]."<TD>".$myrow["karateam"]."<TD>".$myrow["karasub"];

    Either CSS styling or the dreaded HTML "<font color=\"#FF0000\"
/>".$myrow['char_name']."</font>" tags.


But you should use CSS:

echo '<tr><td style="color: red">' ...


Everyone:

Arrgggg.

PHP

echo '<td class="red">';

CSS

.red
  {
   color: #FF0000;
   }

More Arrggg.

$char_name = $myrow['char_name'];  // <-- note ' and not "
$char_level = $myrow['char_level'];
$myClass = $class['class'];
$kara = $myrow['kara'];
$karasub= $myrow['karasub'];

echo("<tr><td class=\"red\">$char_name </td><td>$char_level</td><td>$myClass </td>
<td>$kara</td><td>$karasub</td></tr>");

Note balanced tags, use of variables inside the echo, and unobtrusive css.

Just a manner of style.  :-)

Cheers,

tedd

PS: I know that echo() is not a function, but I like doing it that way and makes it easier for me to understand my code.

PSS: I know that this takes a bit more processor time to to do this, but the processor has more time than I do to understand what my code is doing.


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux