Long time, no see
I know for loops, while loops, if cases, switch, functions, math, basic SQL (insert, select, order), Own sorting algorithm.
So all basic, you know.
My teacher gave me to solve the fibonacci numbers and primes up to 100, which I both did in 1 lesson.
Fibonacci is too easy =/
Prime numbers are more of a challenge, because there's no way to determine whether a number is a prime number based on the previous number... The only way I can see to do that is brute force...
But... numbers are boring, it's always the same ^^
It's much more interesting to build something that is dependant on user input. If your scripts don't have a time limit you could dive into plain sockets and let 2 scripts communicate with each other (one acting as a server, one acting as a client). It gets even more fun when you combine 2 languages like that, but I doubt your php teacher will like that :biggrin:
I've got something a friend told me once that you can make. You know that total bs where they determine the love % between two people? It's not a random number...
This is how it works, based on an example:
Name 1: imnotanoob
Name 2: yesyouare
You count the amount of times each letter is in the names:
#a: 2
#b: 1
#e: 2
#i: 1
#m: 1
#n: 2
#o: 4
#r: 1
#s: 1
#t: 1
#u: 1
#y: 2
In Array-form: (2, 1, 2, 1, 1, 2, 4, 1, 1, 1, 1, 2)
Then you take the first and the last letter (of the letters which are available) and you add that to a new array. (If the number of available letters is odd, you just leave the middle one (eg. (1, 1, 1) => (2, 1))
The example becomes then: (4, 2, 3, 2, 2, 6)
Just repeat that, and when the number exceeds 9, you take the ciphers and count them together to get a new number (eg. 12 => 1+2 = 3)
(10, 4, 5) => (1, 4, 5)
Eventually you only have 2 numbers left, that's the actual result:
(6, 4)
(Guess how many times you get something with an 0 in it?
0 times )
So the love % between imnotanoob and yesyouare would be 64%.
Have fun programming
Or you could just try to recreate my signature =P