470,870 Members | 1,403 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,870 developers. It's quick & easy.

conditional statements and loops

Not long ago I was asked to give PHP lections to some private IT
school. I'm on second lection now, and will be teaching my :) students
conditional statements (if..else and switch) and loops (while and for).
That was my story, now the question.

Can you give me an advise on some geeky use of those statements to stir
up some enthusiasm in students.

Thanks in advance

Oct 19 '05 #1
3 1509
Sergej Andrejev wrote:
conditional statements (if..else and switch) and loops (while and for).
Can you give me an advise on some geeky use of those statements to stir
up some enthusiasm in students.


if: echo 'first' or 'last' part of the week depending on day of the week
for: construct an html table of $x columns and $y rows, echo to page
while: break up a sentence in words, store in array
switch: echo sentence in colour specified by first word

--
E. Dronkert
Oct 19 '05 #2
I noticed that Message-ID:
<11**********************@g43g2000cwa.googlegroups .com> from Sergej
Andrejev contained the following:
Can you give me an advise on some geeky use of those statements to stir
up some enthusiasm in students.


Well I don't know about stirring up enthusiasm but this is what I use
http://www.ckdog.co.uk/phpcourse/2_c...structures.doc

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Oct 19 '05 #3
I noticed that Message-ID: <sv********************************@4ax.com>
from Geoff Berrow contained the following:
I noticed that Message-ID:
<11**********************@g43g2000cwa.googlegroup s.com> from Sergej
Andrejev contained the following:
Can you give me an advise on some geeky use of those statements to stir
up some enthusiasm in students.


Well I don't know about stirring up enthusiasm but this is what I use
http://www.ckdog.co.uk/phpcourse/2_c...structures.doc


And
http://www.ckdog.co.uk/phpcourse/3_arrays_and_loops.doc
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Oct 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by clueless_google | last post: by
8 posts views Thread by Dimitri Furman | last post: by
1 post views Thread by chris han | last post: by
92 posts views Thread by Raghavendra R A V, CSS India | last post: by
10 posts views Thread by nimmi_srivastav | last post: by
14 posts views Thread by gupta.keshav | last post: by
10 posts views Thread by Dave | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.