I'm trying to output table contents on a webpage and my query is working fine. However, I would like to make sure that the first word in some columns is capitalized when output.
$result = @mysql_query("SELECT b.title, b.image, b.price, a.fname, p.p_name
FROM books b JOIN author a JOIN publisher p WHERE b.fk_a_id = a.a_id and b.fk_p_id = p.p_id;" );
I'm outputting results to a table in HTML.
echo("<tr><td> Title: " . $row["title"] . "</td></tr>");
echo("<tr><td> Author: " . $row["fname"] . "</td></tr>");
echo("<tr><td> Publisher: " . $row["p_name"] . "</td></tr>");
What I would like to do is ensure that the title, fname and p_name are displayed with the first letter as a capital. Should this be done at the query level or is there a HTML function to do this.
Any help greatly appreciated.
Regards,
Tony