That's kind of a broad topic. If you understand programming / scripting fundamentals, then it's going to be kind of falling off a log once you start digging into some tutorials. There's free ones all over the place, and a ton of books to get you started. The stuff you're trying to do is really not that complicated or advanced, no offense!
Probably the biggest adjustment would be that PHP is a Server Side Scripting language, as opposed to JavaScript. ActionScript is technically server-side as well at a higher level, but for most people does pretty much the same stuff as JS.
Seriously look into database fundamentals, tho. You're gonna do 20x's the work trying to use flat files. If you're going to go that route, just put a list (array()) into your php file and loop through that. It'll take save you alot of time with flat-file manipulation and string-parsing.
My college Flute prof. always used to say, "The more music you know, the more music you know." Kind of a duh statement, but translates well into programming / scripting. The more languages you know, the more you know about each language that you know.
Also, it occurs to me that you've already stated every solution that you need from a logic perspective as far as this individual task is concerned. All you need to know is how to express that in PHP. It's not that big of a leap, really.
Good Luck with all that! 🙂