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?

Recommended Answers

All 2 Replies

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.

Member Avatar

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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.