Real-world project for learning PHP

I’ve started the process of learning to code PHP and I’ve got to the point where I understand how stuff works but I really learn best by doing.

I’ve gone through tutorials etc but don’t really feel like I’m learning to code by myself. I had in mind to code a CMS because that’s the kind of thing I’ll be doing once I’ve got to a good level. The problem is I’m not sure if that will be too big an undertaking or not and also, I’m not sure about the logic behind a CMS (how it chooses to display what content, how a templating system work etc).

Basically, can anyone suggest a real-world project that would be good for learning? If the CMS is a good idea, is there anywhere that I can see how they work fairly in depth (logic, not code).

I’ve looked at a few CMS’ to see how they work but the amount of files and code to get through is a lot and it’s beyond me right now to understand it all.

Apologies if this comes up as a duplicate post, I tried to post as a guest but got an error.

Thanks :slight_smile:

Hi there,

I know what you mean - I had the same dilemma. The first thing I did was create various tools that each required different areas of my knowledge of PHP. Some examples:

[ul][li]Datestamp Generator[/li]
[li].doc -> HTML List Converter[/li]
[li]Payment Change Calculator[/li]
[li]Colour Tester (uses gdlib)[/li]
[li]Easy to Use Pagination Function[/li]
[li]Dimension Converter[/li]
[li]Directory Scan/Search[/li][/ul]

The best and quickest way I improved my knowledge however was in my workplace where I was given real life projects for customers aided where necessary by my co-worker.

As for a CMS, we have written one where I work and it is still being modified and upgraded more than a year since its “final”/“completion” stage - it’s a huge project to undertake.

If all else fails, just make yourself your own little website - throw in as many random bits of functionality as you want, user log-in areas, galleries, newsboards etc. As you develop it more and more to your personal liking you should start to develop a real style and comfort with PHP and you should then also have the base code snippets required for a CMS (if you so wish) from the mini modules you created for yourself.

Good luck and happy coding!

Thanks for the reply.

I do like the idea of just starting out with a simple site. Would you recommend doing so with a CMS?

I have a goal which is to create a live website but it will probably use a CMS. The modules and plug-ins would be the stuff I would code. So would it be a decent idea to set up a simple site in Joomla/ModX (or whatever) and just trying to build functionality?

Smokey is giving you good advice.

Start with a website with a database table for images another for text another for users etc
add little bits here and there like user uploads maybe?
Then add in a back-end ‘Admin’ section where you control everything.

The point is your building block by block, and suddenly you have exactly what you intended: a fully blown CMS! but without the pressure of setting yourself the goal of creating one (if that makes sense)

Good luck in your project,

Sponsor our Newsletter | Privacy Policy | Terms of Service