conditional statements and loops

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sergej Andrejev

    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

  • Ewoud Dronkert

    #2
    Re: conditional statements and loops

    Sergej Andrejev wrote:[color=blue]
    > 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.[/color]

    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

    Comment

    • Geoff Berrow

      #3
      Re: conditional statements and loops

      I noticed that Message-ID:
      <1129750404.092 154.135430@g43g 2000cwa.googleg roups.com> from Sergej
      Andrejev contained the following:
      [color=blue]
      >Can you give me an advise on some geeky use of those statements to stir
      >up some enthusiasm in students.[/color]

      Well I don't know about stirring up enthusiasm but this is what I use


      --
      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/

      Comment

      • Geoff Berrow

        #4
        Re: conditional statements and loops

        I noticed that Message-ID: <svidl1p6ckgi5d t8ho4d62oj51s34 re1ak@4ax.com>
        from Geoff Berrow contained the following:
        [color=blue]
        >I noticed that Message-ID:
        ><1129750404.09 2154.135430@g43 g2000cwa.google groups.com> from Sergej
        >Andrejev contained the following:
        >[color=green]
        >>Can you give me an advise on some geeky use of those statements to stir
        >>up some enthusiasm in students.[/color]
        >
        >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[/color]

        And

        --
        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/

        Comment

        Working...