File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes PHP and the fly likes php incrementing grades in a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » PHP
Bookmark "php incrementing grades in a file" Watch "php incrementing grades in a file" New topic
Author

php incrementing grades in a file

daniel kidanee
Greenhorn

Joined: Feb 23, 2014
Posts: 19
Hello, I am new to php and I am trying to do the following task. I fill I am doing it the longer way.
even, it is not working. Can any one help recommend an easy way of doing it? thank you!
Task

Your task is to write a PHP script that reads grades from the file grades.txt, increments the grades by one and writes the incremented
grades to the file results.txt and finally prints the grades from results.txt. If the grade is five, it won't be incremented. The grades in
grades.txt are each in its own row and the amount of digits in a grade may vary. The grades are between 0-5. The grades written in
results.txt should each also be in their own rows.

Example output



My code:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: php incrementing grades in a file
 
Similar Threads
HTTP Status 415 - Unsupported Media Type
How to use excel file in C program for file handeling?
multiple page edits/addto
C to Java Translation, HELP!
echo javascript within php script.