Before learning PHP, it is a must to have learn HTML. (because you will likely be embedding PHP code within HTML) If you don't have any knowledge of HTML, click here to learn HTML.
When I think of PHP, I see a language built by a web developer, for web developer, PHP hit the scene in 1995, today without a doubt I can tell you it is the most popular language for building a dynamic website and application most especially the type that interact with a database, just like a bread and butter, PHP have a partner, another popular open-source database, MySQL. Today you hardly can talk PHP without its MySQL database partner.
Although, although critics who a sometimes computer scientist and novice alike, criticize PHP for lacking in this or lacking that, but the fact is every technology or language has its cons and pros, and for PHP some of its pros includes:
Open-source and free: although the open-source part of PHP may be of little value to a typical Nigerian computer scientist or majority of its users, but I’m sure the free part is of more value to an average user. PHP is not only free but takes less than 20 minute to download the WAMP or LAMP server, install and start building PHP web application, this is what its competitor have not been able to do. Let’s be sincere most web developers are also web designers so they don’t often have the time to start downloading and installing JDK, Eclipse, Tomcat, and configuring swing or buying Oracle database license just because they want to program a website, let alone the hosting pains, all this cost a lot of money and time to setup compare to downloading one free WAMP server and in less than 20 minute you are programming your web and this is why PHP is popular.
Simple to program: As I said earlier most web developer also does web design, and design takes about half of their time when handling a web project. So majority of them don’t have the time to declare all variables types type, create a class, method, properties and do all those object oriented programming stuff before talking about compiling issues and packaging issues and this why PHP wins big time compare to its rivals such as C++, Java or .NET, because its designer is a web developer and he understood this.
I won’t waste more of your time comparing languages, as I’ve said before every language have their strength and downside, I do use Java, .NET, PHP and other older languages, besides computer science is more than learning a programming language; however if today I have to learn a new language to solve a particular problem I will simply do. So stick with PHP for now if you are new to programming and you are sure you will be in the web scene for a long time.
Below are some few other things I got from PHP and MySQL Bible thatyou should know about PHP and MySQL in brief.