- Impact
- 6
This is going to be the first challenge to kick off the launch of this forum.
The Reward will be a two year domain registration of any .com, .net, or .org domain name!
The challenge:
Create a text file containing the letters a-z all on one line.
Exactly like this:
abcdefghijklmnopqrstuvwxyz
The letters can't contain any delimiters.
Now what you need to do with PHP is figure out a way to open up the text file and sort through and split the letters so you can print each letter to the browser on a separate line.
So the end result should be:
a
b
c
d
e
etc..
You must do this using only one echo or print statement.
So
echo 'a';
echo 'b';
echo 'c';
etc..
would not be a valid way of doing it.
These will not be counted as valid either:
echo a<br>b<br>c<br>d<br>etc..
print a<br>b<br>c<br>d<br>etc..
You must figure out another way to do it, any of the above methods will not be accepted.
You'll have to think up some code so you can do it with only one echo or print statement wich will result in each letter being printed on a new line. :D
You can use all the resources available to you to figure out how to do this!
The first person to post the code that can do it in this thread will be the winner.
Ask in here if you have any questions about this challenge.
We'll try to have atleast one challenge a month with some type of reward, some will be easier and some will be harder.
Good Luck!
The Reward will be a two year domain registration of any .com, .net, or .org domain name!
The challenge:
Create a text file containing the letters a-z all on one line.
Exactly like this:
abcdefghijklmnopqrstuvwxyz
The letters can't contain any delimiters.
Now what you need to do with PHP is figure out a way to open up the text file and sort through and split the letters so you can print each letter to the browser on a separate line.
So the end result should be:
a
b
c
d
e
etc..
You must do this using only one echo or print statement.
So
echo 'a';
echo 'b';
echo 'c';
etc..
would not be a valid way of doing it.
These will not be counted as valid either:
echo a<br>b<br>c<br>d<br>etc..
print a<br>b<br>c<br>d<br>etc..
You must figure out another way to do it, any of the above methods will not be accepted.
You'll have to think up some code so you can do it with only one echo or print statement wich will result in each letter being printed on a new line. :D
You can use all the resources available to you to figure out how to do this!
The first person to post the code that can do it in this thread will be the winner.
Ask in here if you have any questions about this challenge.
We'll try to have atleast one challenge a month with some type of reward, some will be easier and some will be harder.
Good Luck!