Going About Explaining PHP

Hi I want to know how should I should go about explaining PHP to my peers.

My situation:

  • I am still a student (about 3 Years self-taught PHP experience).
  • In the course I enrolled we are suppose to do PHP, but due to some reasons, the lecturer is unable to present PHP to us, the class.
  • Since I have the most experience in PHP, I now have to help the class, explaining PHP and helping them solve their problems.
  • We only have a limited time to do the PHP, then have to move on.
  • We all received the book: “Beginning PHP5, Apache, MySQL Web Development” from “WROX”, but the rest of the class feel overwhelmed by it.
  • The most of the class are Designers and not Coders.

Please help and Thank you in advance for any help

Jacotheron

How many hours have been allocated to learning PHP?

Do these hours this include Mysql and Apache as well?

We have about 2-3 weeks to do PHP, MySQL and Apache (I figure that this is not enough) if we do not get extension for the projects.
In this time we also have to do 2 PHP websites (the 1 I have already done, busy helping the others with theirs). The peers does not understand PHP so they can’t go on without me (at this stage).

Does that time include installing the 3 on their pcs?

We use xampp so that we do not have to do advanced installing and set-up of the 3.

First of all, make sure that you’ll be getting some sort of extra credit for teaching this class. Lecturers are paid for teaching hours, and if they’re not living up to that and you’re paying for your course you should get either a replacement lecturer, an extension or compensation for having to step up.

Secondly, without extensive commercial experience with PHP and programming in general (or, at the very least, teaching) you may end up hurting the class more than helping. With that in mind I would probably just teach them the very basic underlying concepts behind the language and teach solely through code.

When does the class start?

The most of the class are Designers and not Coders.
Yes, but are they digital designers - is everyone quite computer savvy? They know their way round their own computers?

I can do some advanced PHP (I have created the Post Office WordPress plugin myself and are still maintaining it) and I create client websites.
What principles/concepts do you suggest I teach them and how far advanced should I go?

@cups The classes have already started. We are all trained in website Design (using Photoshop) and we all know our way around computers.

How many of the class know some html, css, js - would you say? What is the average age? (as if that makes much difference)

The whole class know some basic HTML, CSS and Javascript (Javascript was a module earlier this year) and the erst were modules for last year. The avarage age is 20-21Years (2nd year students)

On Twitter I am linked into a stream which contains a couple of uk education and hack-tivist types - would you like me to widen your request out to try and get their input? I could try and point them here and you would need to post your twitter account, is that OK?

Ok, you may do that.
My Twitter is @jacotheron (or my business’ Twitter @starsites)

Ok - I have asked - something might come of it, who knows…

Now I will chip in with my 2c.

@cups Thank you

The trick with any good teacher is to make the task at hand relevant to peoples lives.

If you are using an *AMP installer, then leave Apache and Mysql on the back burner to start with - explain it off as magic for the time being.

Associate clearly in their minds that PHP acts like a wrapper over the operating system - anything the computer can do, PHP can do (OK, its not Photoshop…)

ie open files, create directories, add files together, get the time, delete files, append to files, read from them and so on.

The file system of the computer can be PHPs playground.

To enforce that, have them make something useful you have to dream up a task which flexes all these skills - doing this then brings in :

echo, print, print_r, var_dump, glob, is_dir - jump into the online manual and at the foot of each function page are links into “related functions” - and they should be explored - because there are always so many ways to do the same thing.

Challenge them to do the same task using at least 2 other different functions, say.

Make sure everyone has an easy-in to the online manual eg:

php . net / <function_name>

Next massive task is arrays.

These are the key to programming - if you don’t get arrays you don’t ever really get programming.

Again, create a challenge - bearing in mind two very distinct methods you have to understand fully. That is arrays as Stacks and arrays as Queues (FIFO, LIFO).

Use a queue of people in a post office as an example. Use names as array elements.

How do you get Bob to join the end of the queue? How does Mary get served (removed from the front of the queue?) How do you split the queue in 2 when a new window opens?

Real life easy to understand examples, vs abstract ideas.

There are 80 different PHP array functions. Spend at least 3 days on arrays.

Take arrays from the file system (fopen read csv etc) write them back, have the arrays create html lists, menus, dropdowns, tables.

Manipulate the arrays in PHPs memory - resorting tables and so on.

Move to multidimensional arrays, give people in the Post office queue an age.

Add people to the queue via a form…

Is this getting you going?

Show them how to ask good questions on a forum :wink:

What is the name of this course? Maybe the course is only meant to give a very brief overview of the language, going in-depth (just because you can) could do more harm than good.

If the other students feel out of their depth, that’s potentially a good sign that they’re going to learn something new if they persevere.

Is there somewhere we can look at the course outline/goals so we can help you stay on-track with its intent?

The course name is Multimedia, and it is from CTU, ctutraining.co.za. The career campus section.

Thank you all. Will keep this in mind.

If you need help with examples then ask away.