I have a while loop setup that grabs data from my database and inserts into tables. What im stuck on and want to do is check the table column name and any ending in the letter 'P' I want to be able to highlight or bold all of the data in that row.
Can someone help me with this code please??
Here is the loop I have:
Can someone help me with this code please??
Here is the loop I have:
Code:
// Prints the columns
echo "<table class='searchTable' border='1'; <tr>";
for($j = 0; $j < mysql_num_fields($result); $j++) {
$field_info = mysql_fetch_field($result, $j);
echo "<th>{$field_info->name}</th>"; }
// Print the data
while($row = mysql_fetch_row($result)) {
echo "<tr>";
foreach($row as $_column) {
echo "<td>{$_column}</td>"; }
echo "</tr>";
}
echo "</table>";