Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Changing colour of text in a PHP page

  • 14-04-2005 04:47PM
    #1
    Registered Users, Registered Users 2 Posts: 202 ✭✭


    hey all, the following code is used to print out information in a table

    what i want to be able to do is change the colour of the info in the table

    any help greatly appreciated!

    echo "<table border='1'>";
    echo "<tr> <th>Game</th>
    <th>Description</th>
    <th>Price</th>
    <th>Qty</th>
    <th>Format</th></tr>";
    while ($row = mysql_fetch_array($sql_result))
    {

    echo "<tr><td>";
    echo "<a href=\"".$row."\">".$row."</a>";
    echo "</td><td>";
    echo $row;
    echo "</td><td>";
    echo $row;
    echo "</td><td>";
    echo $row;
    echo "</td><td>";
    echo $row;
    echo "</td></tr>";
    }
    echo "</table>";
    }


Comments

  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


    Just use a <font> tag, you don't need any php for that.


  • Registered Users, Registered Users 2 Posts: 4,276 ✭✭✭damnyanks




  • Registered Users, Registered Users 2 Posts: 1,268 ✭✭✭hostyle


    satchmo wrote:
    Just use a <font> tag, you don't need any php for that.

    <font> tag? If you're living in the 90's, maybe. Use CSS.


  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


    hostyle wrote:
    <font> tag? If you're living in the 90's, maybe. Use CSS.
    If he doesn't even know how to change the colour of text, I think dumping CSS on him mightn't be the smartest idea.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    satchmo wrote:
    If he doesn't even know how to change the colour of text, I think dumping CSS on him mightn't be the smartest idea.
    Indeed. If he hasn't got to grips with HTML and the whole server-client thing, CSS is likely to cause his little brain to melt.


  • Advertisement
Advertisement