If you like php, use it.
Theres a simple quote who's origins i forget (think it was bjarne stroustrup) that goes "there are those languages that people complain about, and those that people dont use".
Sadly, the more people who use language, the more you generate hate, and php is one of the most widely used in existence.
PHP has alot going for it:
- its an elegant language
- its quite quick to write almost anything in
- its generally quite fast
- theres bucket loads of people using it, so finding solutions to problems is easy
- lots of different frameworks if you need them
- tonnes of api support.
- almost every web host supports it.
- the number of people using it generally just helps the code base, bugs get found and dealt with, etc etc etc.
The only reason to switch to another language comes down to the goals your trying to achieve, which aren't really stated. Generally speaking you could achieve any type of web content in any language to an extent. There are few languages that have the support for api's that php does, thats for sure. Perl is probably the only one that beats it in terms of "i want to connect to from my web code".
But it depends also on what you had in mind in terms of switching to.
- Java is a reasonably nice language, very well supported (by vendors) and scales well, but requires significant development time and quite a decent amount of grunt - forces you to abstract your work ad infinitum but sometimes thats a good thing. Lots of different api's, though mileage varies greatly.
- Dot-net i personally find to be somewhat on the buggy side, but again, well supported and well used - often forces you down an MVC framework path, which i dont like.
- Python's probably a better language generally, but for web coding, you get caught up in the basics with python around choosing frameworks and so forth and later if you find the framework you choose wasnt that great, then its re-code time cause frameworks generally dont have easy migration options. My main annoyance with python is that learning python tends to diverge a fair bit from helping you with other languages (i.e. learning python wont help you with c/c#/c++/java/etc).
- Ruby has similar traits to python - you get caught up in the frameworks, the language is nice but doesn't translate easily to other languages.
There are other options, but personally, stick with the top three if its your first coding exercise for content - php, java, dot.net