Let’s face it, there are countless tutorials out there all claiming to have the right answers when it comes to teaching you how to build a website with PHP. On the surface, that’s great. More choices are good as it means you can give yourself a well-rounded opportunity to learn to do something new and build a website using PHP as its base. What these “tutorials” don’t teach you is that there is more than one way to build a site with PHP code.
Is this is a static website? Are you simply trying to run with a CRM? Perhaps instead you should be learning PHP to build a plugin or extension to extend the functionality of an existing concept? All of these are things that must be examined. Sadly though, these considerations are almost always left out of the cycle. In this article, you will learn the differences between extending functionality with PHP or trying to build something with PHP from scratch.
Much of the time a person believes that in order to design a website, it means building up a content management system (CMS) from scratch. This is a common mistake and one that can honestly be overcome by simply spending some time with alternatives such as WordPress, Drupal, among others. Each of these CMS’ are designed with PHP at the core. What’s fantastic about using an exis
ting CMS is that you can take the existing PHP code for your website and alter it to meet your own needs, much like you might if you were building a website with PHP from scratch.
Most of the time the PHP based alterations you will see here are surrounding the templates and functions within them. This is where having some solid PHP skills can come in handy. While in theory anyone with enough patience can build up a PHP based template for their favorite CMS, having already honed ones skills with PHP programming will only make the process much easier. It might even make the difference between making minor alternations to a basic default template to having the PHP skills to create a template unlike anything anyone else has ever tried before.
For a non-CMS website, one might look to use something called a PHP include to make maintaining a website a whole lot easier. For example, most websites have a header, footer, page content and possibly a page menu on the side. With me so far? Great, keep reading. Now obviously the content section is going to be a case by case situation. An about page, a FAQ, the home page, etc. This section is fairly fluid and would be devoid of PHP as casual HTML handles everything here.
But this brings up back to the header, footer and page menu. Each of these are generally made up of static content and don’t need to be continuously duplicated on every single page that is created. Well, at least not manually. So here’s the power of the PHP include.
<?php include "header.php"; ?>
What did this do exactly? Well if you placed the code that would normally be put into the header section of your website, you will see this being called up into the main site via the include command. The same approach works with the footer and page menu. To make all of this come together however, there are a few additional things to realize. First, PHP must be enabled on your web server. In addition, your entire site structure needs to be using the .php extension. This means using index.php, header.php, about.php, contact.php and so on.
There are entirely too many methods out there on the Web when it comes to learning PHP. The problem is that most of the help avaible are in book form only, don’t provide you with a clear visual of what you’re getting into or worse, plus are unable to give you any real world skills you can actually use. This is problematic if you seriously think that your going to be learning PHP with any quickness. What you need is a fast track approach to learning the programming language. How fast? How about roughly 17 hours.
I have looked into a number of courses and books out there, the only one that really provided a quick, crash course with any success was SimplePHP. My reasons for recommending this over countless other tutorials and books are as follows.
Now this is a great place to start, but this course offers even more. You also gain access to videos that will help you take the next step on our PHP learning journey.
And here we are. Still with me? Are you deadly serious about learning PHP today, as in within your foreseeable future? Awesome, then you are going to be wanting to pick up a copy of SimplePHP. It’s a simple as that.
But please don’t think this is the only way to learn how to build a website with PHP, run PHP scripts or troubleshoot existing PHP code that isn’t cooperating. I mean, you can always hit the search engines and see what you come up with? Let’s take a look at some examples of the help elsewhere, shall we?
W3Schools – Great source for help, but for the love of Pete…does any of this look easy to you? Poorly organized, confusing options, assuming you have any idea where to start.
PHP 101 – Better, at least you can find a basic place to get started with here. But learning PHP goes way beyond this. Most of this are just silly examples lacking real world examples. And where the videos that are going to get you using PHP – today!
I could keep going, but I think you get the idea. Stop making this harder than it needs to be. Tackle your PHP projects now, today. Download a copy of SimplePHP and stop spending your day hopping from website to website reading tutorials. You have code to be writing!