The best way to learn PHP is to read the online manual, or better yet, download the Windows CHM (HTML Help) version of the manual and keep it open while you're coding. It's not a strongly typed language (although it offers strong typing as of version 5), so if you're familiar with JavaScript it should be a piece of cake. I've found that I can easily port scripts from ASP to PHP despite knowing very little about the ASP object model (although I am admittedly familiar with OOP in JavaScript in general).
In addition to the core language functions, PHP is organized around extensions that provide scripting interfaces for common open source C/C++ libraries. Some of the most common extensions, such as MySQL, are compiled into PHP by default. You can do object-oriented programming in PHP, but the built-in functions and extension functions are not usually object-oriented (DOMXML being a notable exception). Thus, the names of most functions have the name of the module prefixed: e.g., mysql_query(), array_push(), etc.
|