Re: Text Color

From: Date: Tue, 04 Mar 2008 18:03:18 +0000
Subject: Re: Text Color
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-270955@lists.php.net to get a copy of this message
"<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

« previous php.general (#270955) next »