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 