Just started "playing" with php and have a question. I currently have a csv
list such as this:
11-08-03 | Tournament | Chapman rules
12-18-03 | Beat The Pro | pick your partner
etc.
Is there a way by using the first field to pull one or all the events later
than the current date and, if so, returning a date say of Nov 8 and Dec 18?
Though I wanted to give the above a go, I figured out a way to pull the
correct events if I set the first field to 20031108, etc. Here is what I
got:
$readfile = file("events.txt");
for ($k=0; $k<=count($readfile)-1; $k++) {
$fields = split("|",$readfile[$k]);
$date = date("Ymd");
if ($fields[0] >= $date) {
print ("<tr><td>$fields[1]</td><td><a class=\"noUL\"
href=\"javascript:void(0);\"
onclick=\"window.open('$fields[0].htm','NextEvent','scrollbars=yes,resizable
=yes,height=600,width=650')\">$fields[2]</a></td><td>$fields[3]</td><td>$fie
lds[4]</td></tr>");
}
}
?>
The csv file for above would be
20031108 | Nov 8 | Chapman (Pinehurst)
but there has to be a better way. Thanks for any help
Bill