I am a php newbie, and I have realised that there are many functions to learn in php, but can anyone point out which ones are the best for beginers? Can you mentions 10 most usefull functions or more?

5 Years
Discussion Span
Last Post by diafol

Such a list would be subjective no matter how you look at it because everyone has different goals and problems that need solving. A better approach is to consider each problem you have when you have it and then ask if there's a function out there that already does it. You don't need to fill your head with every available function; simply using the language and building a list of your most useful functions over time is just fine.


I agree with deceptikon - no such thing as a top 10. However, common things that crop up during early learning may be more to do with syntax and ideas or way to do things rather than certain native functions.

Things I'd look at (not in any order):

  1. creating user-defined functions - these can be re-used time and time again by different bits of your code.

  2. see how arrays work - these can keep related data together. V. useful - you'll be using these a lot.

  3. control structures or conditionals - 'if' statements and 'switch' - again these will be key elements in your programming.

  4. common native functions to get to grips with tend to be date and string functions - have a play around with these. You'll notice that the parameter order can vary with similar functions - a particularly annoying feature of php.

See the php.net manual for examples on usage

Once you've mastered the basics and can write simple programs, have a look at Object Orientated Programming - the sooner the better. This will give your skills wings!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.