1,105,384 Community Members

What are the most useful PHP functions for a newbies to learn?

Member Avatar
Junior Poster in Training
72 posts since Mar 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 5 [?]
Skill Endorsements: 0 [?]

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?

Member Avatar
Eternally Awesome
4,684 posts since Jan 2012
Reputation Points: 1,341 [?]
Q&As Helped to Solve: 684 [?]
Skill Endorsements: 104 [?]

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
Where are my eyes?
12,963 posts since Oct 2006
Reputation Points: 1,821 [?]
Q&As Helped to Solve: 1,847 [?]
Skill Endorsements: 92 [?]

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 article has been dead for over three months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: