here's a littlt 101 about writing programs.
1) Write down, in your own words, what the program should be able to do.
2) Write a functional diagram of the various things you think the program should do. This can be simply a sequence of descriptions like:
start program
- Print welcome message
- Get lastest articles
- Print articles
- end program
do this, then think about it, and re-do it.
3) Select which of these diagrams you want to start with, and begin to translate it into PHP, first very simply like
<?
// Start program
echo "Welcome message";
// end program
?>
slowly build more functions into it.
Don't just start coding, or you'll soon forget what you were trying to do.