The following code is giving me some problems. It is adding an extra 0:00 at the end of the list and I need to remove it but I have tried everything I can think of and it is not working. If anyone can please help me out that would be greatly appreciated. Thanks!
$fh=fopen("datebook.txt", "r");
while ( ! feof($fh)){
$text = fgets($fh);
list($name, $phNum, $address, $date, $income)=preg_split("/:/", $text);
$raise=preg_replace("/(\d+)/e", "$1+250", $income);
echo "$name: ";
printf("%.2f\n", $raise);//reads one line to far. How to end it at last line?
}
fclose($fh);