What are the most useful PHP functions for a newbies to learn?
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?
36 Minutes
Discussion Span
Related Article: I want to learn PHP
is a PHP discussion thread by rubai that has 7 replies, was last updated 1 year ago and has been tagged with the keywords: learn, php.
Vribium
Junior Poster in Training
56 posts since Mar 2011
Reputation Points: 10
Solved Threads: 3
Skill Endorsements: 0
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.
deceptikon
Challenge Accepted
3,427 posts since Jan 2012
Reputation Points: 822
Solved Threads: 473
Skill Endorsements: 56
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):
creating user-defined functions - these can be re-used time and time again by different bits of your code.
see how arrays work - these can keep related data together. V. useful - you'll be using these a lot.
control structures or conditionals - 'if' statements and 'switch' - again these will be key elements in your programming.
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!
diafol
Keep Smiling
10,630 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57