Jump to content

rama1

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rama1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. YOU R A STAR & a very helpful person. It just worked . Thanks
  2. Hi gizmola, tried the 'css style class' route with the following: <head> <style type="text/css"> td {color: red; } </style> </head> .... $result = mysql_query(select bal, etc. etc ..query ) while($row = mysql_fetch_assoc($result)) echo "<tr>"; echo "<td>" . $row['Account'] . "</td>"; echo "<td>" . $row['licence'] . "</td>"; echo "<td>" . $row['own'] . "</td>"; echo ($row['bal'] > 50000) ? '<td class="red">' : '<td>'; echo "{$row['bal']}</td>"; // echo "<td>" . $row['bal'] . "</td>"; echo "</tr>"; } .... The problem is that all the entries are formatted in red. Any way I can target the css to the $row['bal'] based on a condition. I will try the 'associative array element inside an interpolated string' later once I have figured out what it means (-;
  3. Thank you gizmola for the swift help. I am new to PHP, will have a go using your suggestion & hint. Will report back.
  4. how to format only one specific row based on the value of one cell in a row? $result = mysql_query(select bal, etc. etc ..query ) while($row = mysql_fetch_assoc($result)) echo "<tr>"; echo "<td>" . $row['Account'] . "</td>"; echo "<td>" . $row['licence'] . "</td>"; echo "<td>" . $row['own'] . "</td>"; echo "<td>" . $row['bal'] . "</td>"; echo "</tr>"; Would appreciate help on how to format only the $row['bal'] output to red colour IF bal >5000 Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.