Hey,
I'm writing values from a form to a text file and then parsing those into an HTML table. No problem there everythingis working fine. This is financial data and I want to color the text red in the HTML if the value is preceeded by a minus sign "-"
I'm pretty new to this, so any help would be greatly appreciated.
This is the code I'm using to populate each field based on line breaks in the text file:
<td>
<?php
$lines=file('text.txt');
for($i=0;$i<1;$i++){
echo "".$lines[0];
}
?>
</td>
How can I determine if the value of $lines[0] starts with a - and color it red?
Any help on this would be much appreciated!
Thanks,
k