matttherat Posted August 29, 2010 Share Posted August 29, 2010 hi. i want to echo part of my code in bold or strong. can anyone help please? echo "<table border='0'> <tr> <th></th> </tr>"; $row = mysql_fetch_array($result) or die(mysql_error()); echo "<tr>"; echo "<td>" . $row['question']. " ". $row['answer']; "</td>"; echo "<tr>"; echo "</table>"; I want to bold the $row question part. Hope someone knows. thanks Link to comment https://forums.phpfreaks.com/topic/211998-echo-var-in-bold-or-strong/ Share on other sites More sharing options...
PaulRyan Posted August 29, 2010 Share Posted August 29, 2010 Use the following, hopefully it will suit your needs echo "<table border='0'> <tr> <th></th> </tr>"; $row = mysql_fetch_array($result) or die(mysql_error()); echo "<tr>"; echo "<td><strong>" . $row['question']. "</strong> ". $row['answer']; "</td>"; echo "<tr>"; echo "</table>"; Thanks, Paul. Link to comment https://forums.phpfreaks.com/topic/211998-echo-var-in-bold-or-strong/#findComment-1104843 Share on other sites More sharing options...
litebearer Posted August 29, 2010 Share Posted August 29, 2010 small typo... change this $row['answer']; to this $row['answer'] . Link to comment https://forums.phpfreaks.com/topic/211998-echo-var-in-bold-or-strong/#findComment-1104849 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.