Saturday, January 25, 2014

A Sample Program

Now that we have a web server and PHP installed, the next step is to install Symfony2 and NetBeans. However, I decided to take an excursion here and familiarize myself a little bit with the syntax of PHP. For this purpose, instead of digging through books or tutorials, I will work on simple exercises to learn the workings of this language.

Here is the first program that I will be working on:

Write a program which receives input from 10 drop-down lists, where the possible values are integers between 0 and 9, inclusive. The values should be stored in an indexed array. After the numbers are collected from the user, the contents of the array should be displayed on a new page and the user should be presented with a choice between sorting the values, calculating the average of the values or starting over.
I will give a step by step explanation of the program as I write it.