To properly learn PHP you would really need a developmental environment which at the least would consist of a webserver and PHP installed on your local PC to write and test code with. A good online resource is Practical PHP Programming Apache (a webserver) is free and so is PHP and MySQL (a database server) would also be of help. PHP and MySQL work quite well together.
This should get you started.You can do a search of these forums and get links to Apache and PHP MySQL as well as installation programs like XAMPP or WAMP and maybe MAMP (for Mac). All of which will install a working Apache with PHP and MySQL on your local PC without any headaches.