Jeff wrote:
Please, can anyone tell me how to produce colored text? For instance if I wanted to following code to be printed as red text what would I need to add to they code? Thanks in advance.

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

To the example code, nothing.

But, you could add a CSS entry that would do the trick.

<style>
        td {
                color: red;
        }
</style>

This would make ALL <td ...> tags have a red font color.

If you wanted, you could add a class attribute to the <td ...> tag and only effect the table cells that you intend.


<style>
        .highlight {
                color: red;
        }
</style>


<?php


echo "<TR>
        <TD class='highlight'>{$myrow['char_name']}</td>
        <TD class='highlight'>{$myrow['char_level']}</td>
        <TD class='highlight'>{$class['class']}</td>
        <TD class='highlight'>{$myrow['kara']}</td>
        <TD class='highlight'>{$myrow['karateam']}</td>
        <TD class='highlight'>{$myrow['karasub']}</td>
</tr>";

?>

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

Reply via email to