Page 1 of 1

Assigments

Posted: Tue Oct 31, 2006 9:18 am
by Circle
Is some one on this forum aware of a website that gives you PHP assigments to do in a learning way. Browsing the web I find a lot of good tutorials to learn PHP but I allway's have found it more easy to learn while doing it.

If not would some one be kind enough to support me in this and give me assigments to do as homework. I'm just a beginner at the moment so it would be nice if I could start with something easy to do before diving into all the difficult assigments.

Thanks in advance,

Ruud Hermans

Posted: Tue Oct 31, 2006 9:25 am
by feyd
I would suggest you attempt to understand and solve other users' coding problems that are presented here. Some are quite simple, others are more complex, but users will provide a great variety of challenges to learn from.

Posted: Tue Oct 31, 2006 9:30 am
by Circle
feyd wrote:I would suggest you attempt to understand and solve other users' coding problems that are presented here. Some are quite simple, others are more complex, but users will provide a great variety of challenges to learn from.
I believe so to that's the way I learned HTML in the past but I would like to speed up things for myself a bit and think this would help with that.

Offcourse I will also be reading other forum members their issues and the way more advance members resolve them.

I hope one of you would like to help me in this.

Ruud Hermans

Posted: Tue Oct 31, 2006 9:52 am
by Chris Corbyn
<strong>Assignment 1:</strong>

Write a function to open a plain text file, add line numbers to the start of each line and then save and close the file. I should be able to specify the file I wish to add line numbers to.

For example, if my file "foo.txt" looks like this:

Code: Select all

Apples
Smarties
Chocolate

Strawberries
The resulting file should become "foo.txt" with the contents:

Code: Select all

1.  Apples
2.  Smarties
3.  Chocolate
4.  
5.  Strawberries