On Another, Unrelated Note…
Go check out http://www.wtsr.org/! I just finished writing a little script to give them the “On Now” block in the right column. It’s a simple PHP script that parses a .csv file and does a few checks to determine day and current time.
I tried using file(), but it didn’t like the file, for whatever reason. Probably because it was using \r instead of \n for newlines. Oh well. So, I had to do a character-by-character parse (until I realized I could use a regular expression…) to get it implemented. Here are the two loops I ran. I’m sure it could be written more efficiently (like, checking during the first loop for everything, instead of just Day). How would everyone else write this?
http://php.net/manual/en/function.fgetcsv.php
Interesting. That would definitely help cut down the loops. I was looking for something like that, but I guess I just skimmed past it as I was looking for it. Thanks!
I don’t see any HTML in that at all. Where are your and ’s? I give your code a fail for a lack of dynamic text and flashing pictures.