Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi to all,
This is a weird quetion, but has anybody seen PHP exercises on the Internet? I am new to programming, have little experience with PHP and MySQL but would like to boost my knowledge. I remember that there were exercises for standard programming but what about PHP? Maybe some of you may suggest some starting point? Some simple script to try to write or something?
Greetings,
Maris

I'm not sure what you mean by "standard programming", but there are plenty of PHP tutorials, if that's what you're after. Use the google directory:
http://directory.google.com/Top/Computers/Programming/Languages/PHP/Tutorials/Good luck,
-SN

Well I meant simple programming languages which are tought at school - like pascal, qbasic. A way of learning is describing the theory - which I have already done. And then people are given exercises. For example, they are tought the function while and its syntax and they have to create some kind of loop... Ok, but thanks anyway SN!

You really should get this one book ("PHP and MySQL Web Development, Second Edition"). It goes over just about everything you need to ground yourself in working with PHP/MySQL. The later chapters deal with projects, in which you see a shopping cart, forum, etc. all implemented. You might try the O'Reilly PHP book and the Cookbook as well. Always reference the online documentation (or download with a stripping program) for the comments. For example, the section on pseudorandom number generation has some great comments and code samples.
PHP projects are generally a little different from the traditional programming project because they are almost always focused on the much-hyped web services. Therefore, you will almost always see sessions, a database, authentication, and therefore the same types of problems coming up again and again. This makes it easy to jump in, but if you are not entirely interested in learning the technicalities (i.e. limitations and current way of doing things), then many PHP projects will be boring. It is good to be familiar with these types of setups, but at the same time they are limited in many ways. As an implementation of theory, these projects will heavily stress the practical here and now.
Easiest thing to do is take an existing script idea, see how it has been implemented in one or more cases, and attempt to create your own.
Just find one of many script sites and look for a script that tries to do one thing well. Spend a few minutes thinking what you would do to solve that problem. Then, cheat and look at the code. Go back to your idea, improve it, and implement it.
Dev-PHP IDE is fairly nice (Windows-only). Install PHP on your system to get the most out of it.
If you are looking for less application-specific practice in programming logic, I would suggest Scheme or Python.

Hey, I have that book, "PHP and MySQL Web Development". I actually like it quite a bit. It's well written and has good examples and so far has answered pretty much any question I have about PHP.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |