1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how can i learn php...is it easy?

Discussion in 'PHP' started by webgracesam, Jul 5, 2007.

  1. #1
    just wondering if php is easy?

    can someone guide me for a better way to learn php?
     
    webgracesam, Jul 5, 2007 IP
  2. ichigo

    ichigo Well-Known Member

    Messages:
    2,913
    Likes Received:
    116
    Best Answers:
    0
    Trophy Points:
    135
    #2
    ichigo, Jul 5, 2007 IP
  3. Greg Carnegie

    Greg Carnegie Peon

    Messages:
    385
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It is always better to start with a book then articles.

    PHP is the easiest programming language to learn so it is good you are starting with it.
     
    Greg Carnegie, Jul 5, 2007 IP
  4. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #4
    i wouldn't say that it is the easiest, for a beginner i would suggest learning html if you don't know it already (this includes proper valid semantic html and css). then along side i would suggest playing around with basic or ansi c or even c++ if you think you are up to it. from there, after a couple years or so depending on your learning curve, i would suggest taking up php. these other languages so that you have a better understand of how programming works outside of the web. i say ansi c and c++ because the syntax is very similar to php. basic on the other hand is the programming language of just about every beginning programmer. many high schools and colleges actually offer courses in basic because it's a fairly simple language to learn however, the syntax between php and basic varies significantly. as for articles vs books, a book is definitely the way to go. for any language. they cover a lot more than a simple article on one particular subject and you're bound to learn a lot more. and i would also suggest reading each chapter away from the computer without trying any of the examples and then starting over with that chapter in-front of the computer and doing the examples along with it. this way you're not just skimming for examples, you're actually following along and learning something. you say something 100x in a row, you're less likely to forget it. talk to other programmers. read other programs. this is far more important than any book or training course. also, this is not something that you are going to learn over night. any decent programmer will tell you that it has taken years to get where he or she is currently at. and believe me, with time comes better code and a better understanding of how to use it wisely to your advantage. shoot for learning it over a 10 year period, not a 21 day period. in the beginning get interested in programming. do it because it is fun. make sure that it keeps being enough fun so that you will be willing to put in ten years. over time, it will pay off.

    i hope you take my advice to heart. even if you don't take it, consider it.
    good luck and happy coding.
     
    ansi, Jul 5, 2007 IP
  5. Brewster

    Brewster Active Member

    Messages:
    489
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    60
    #5
    I completely agree with ansi - good recommendations. I learnt C before I learnt php and found the transition pretty easy, but for you this would depend on how much you know about programming concepts.

    I would also recommend downloading some open source php programs and taking them apart to see how they work

    Brew
     
    Brewster, Jul 5, 2007 IP
  6. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #6
    It is easy to learn if you already know a procedural language, else you may find it difficult to handle initially.
     
    it career, Jul 5, 2007 IP
  7. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #7
    tamilsoft, Jul 5, 2007 IP
  8. pandey

    pandey Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8

    Indeed a good advice.But I beg to differ from your advice from there, after a couple years or so depending on your learning curve, i would suggest taking up php.. One year is too much to learn a new language. In my view it should not take more than one month to learn a new language.
     
    pandey, Jul 6, 2007 IP
  9. seogirl

    seogirl Banned

    Messages:
    334
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Are tutorials on the web enough to learn php? Are there any good books available for the language?
     
    seogirl, Jul 6, 2007 IP
  10. Cloudberries

    Cloudberries Peon

    Messages:
    74
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I guess this is a fairly accurate statement, in a sense. If you stick at it, work through lots of examples, try and get the basic structure of the language in your mind (Like learning french, it's no good learning how to say a bunch of phrases and nothing else - you've got to learn how everything sticks together, and the limitations of the language) you could probably get to the stage where you can write useful code in a month.

    But to really get a feel for it, for it to come naturally and so you can sit down and work through very complex problems quickly and with ease, takes a lot longer, until you're comfortable using it. This could well take a couple of years.

    I guess you wouldn't expect to truly learn French in a month either :)

    I've always found the O'Reilly series of programming books very helpful, and concise. For beginners, books are the best course of action, rather than websites (although there is enough info on the web to learn any language 100 times over! :) ) - once you know what you're doing with a language, it's probably faster just to quickly Google for what you need.

    I've not got either of these books, but I guess they'd cover everything you'd need to get started

    http://www.amazon.com/Programming-P...0037407?ie=UTF8&s=books&qid=1183718103&sr=8-2
    http://www.amazon.com/Cookbook-Cook...0635984-0037407?ie=UTF8&qid=1183718103&sr=8-2 the PHP cookbook -"Cookbooks" are good, as they contain hundreds of examples, which you can look at, type in, play around with - these may help you understand some of the more abstract concepts better than just reading lines of explanation.
     
    Cloudberries, Jul 6, 2007 IP
    seogirl likes this.
  11. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #11
    researchers have shown that it takes an average of 10 years to develop expertise in any of a wide variety of areas. music composition, chess playing, painting, swimming, tennis, and yes.. you guessed it, programming.
    even mozart, who was a musical prodigy at age 4, took 13 more years before he began to produce world-class music.

    so go ahead and buy that PHP book... you'll probably get some use out of it. but you won't change your life, or your real overall expertise as a programmer in 24 hours, days, or even months.
     
    ansi, Jul 6, 2007 IP
  12. Greg Carnegie

    Greg Carnegie Peon

    Messages:
    385
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #12
    When i started programming first i had a huge problem with "Type mismatch" error in turbo pascal or in delphi rather, PHP took it off me.

    Besides in PHP without much knowledge you can write simple application which can be useful like guestbook or whatever. I know it won't be good application probably a lot of unneded code, but it is a start.

    In c# you actually can't make such start, within first month you won't write anything useful and i hope we are about c applications for DOS, not windows. There is to much code for newbie at first sight.
     
    Greg Carnegie, Jul 6, 2007 IP
  13. seogirl

    seogirl Banned

    Messages:
    334
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Thanks Cloudberries. And is it necessary to be a expertise in c/c# to have good command over php? or just the basics are enough?
     
    seogirl, Jul 6, 2007 IP
  14. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #14
    c/c#/c++ are not required at all when it comes to php. i recommended these to get a feel for how programming works outside of a 'web environment' and i think that it is a very good idea. however, you can start learning php on it's own without knowing any other language to begin with but if you have a better understanding of how things work outside of the web, you're more likely to better understanding how the web works and what can be done with it to use it to your advantage.
     
    ansi, Jul 6, 2007 IP
    seogirl likes this.
  15. Cloudberries

    Cloudberries Peon

    Messages:
    74
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #15
    It's not really necessary to know something like C to have command over PHP, they're both very similar in terms of syntax - i.e. you'll encounter things like "for loops", "if-else" statements, functions, classes - and you can take structures from one and apply them to the other.

    C is a lot stricter in terms of "types" though, i.e. in PHP you can have a variable called $number and then say

    
    $number = 1;
    $number = "one";
    
    Code (markup):
    And that will work perfectly well. In C, it's not quite that simple (although it's a while since I did any C coding, I may need backing up on that point :) ) - as a rough rule though, learning PHP means you don't have to worry about things like memory allocation etc. - all the fun things that come with writing applications in other languages!

    If you're looking just to program little applications for websites, as most people will be, then PHP's just what you need. If you then want to move onto something like C, then, yeah, it'll take a while to get used to all the extra restrictions, but the ground-rules will be in place
     
    Cloudberries, Jul 6, 2007 IP
    ansi likes this.
  16. pfek

    pfek Member

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #16
    You should find yourself a php book, but I suggest that you don't take a low-level one, take an intermediate book so you will learn faster and get on the cool stuff more quickly.

    If you don't want a book, there are so much tutorials in the internet that you should be able to learn everything that you want really fast.
     
    pfek, Jul 6, 2007 IP
  17. BoutiqueMusic

    BoutiqueMusic Peon

    Messages:
    228
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Thanks for the advice!
     
    BoutiqueMusic, Jul 26, 2007 IP
  18. Jezek

    Jezek Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    php.net is the best reference. well it is good when you already know the basics. but for the basics i would try pixel2life.com then once you got those down mess around and start working on some scripts. and when you forget what a function does go to php.net
     
    Jezek, Jul 27, 2007 IP
  19. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
  20. DeViAnThans3

    DeViAnThans3 Peon

    Messages:
    785
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    0
    #20
    I have started off with a simple beginners book. At that moment I already had knowledge of HTML and CSS, but nothing more than that.
    When I got through the book, step-by-step, I came so far that I were abled to learn from online articles and from the php manual. In the beginning you might not get anything from the syntax shown on php manual pages (I still remember I didn't get what was ment with it lol), but after a while, you'll learn what it actually means :)

    Go for it!
     
    DeViAnThans3, Jul 28, 2007 IP