www.webdeveloper.com
Results 1 to 12 of 12

Thread: help with learning php

  1. #1
    Join Date
    Dec 2013
    Posts
    57

    help with learning php

    I want to know if I can learn how to write scripts with php alone or do I also need to have some html code to go along with the php.

    Also, what are some of the best sites for learning and testing php for a beginner?

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,247
    If you want the results of your PHP script to display as a web page in a browser, then you'll need some combination of HTML, CSS, and/or JavaScript for the "client side" of things, as PHP is normally used on the "server side".
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Dec 2013
    Posts
    57
    Quote Originally Posted by NogDog View Post
    If you want the results of your PHP script to display as a web page in a browser, then you'll need some combination of HTML, CSS, and/or JavaScript for the "client side" of things, as PHP is normally used on the "server side".
    So how would a person be able to know if the script they wrote is good. Is there something like a validator for php as there is for html?

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,247
    Quote Originally Posted by ytesfay80 View Post
    So how would a person be able to know if the script they wrote is good. Is there something like a validator for php as there is for html?
    There are syntax checkers built into most decent code editors that will tell you if you have made relatively simple errors in using the language, but that's the easy part. That won't tell you whether the program does what you want it to do, or just as importantly, that it does not do things you don't want it to do. That's where various types of testing come into play (unit tests, integration tests, system tests, load tests, performance tests, and so forth).

    But then that's the same with HTML: a validator will tell you if you have well-formed HTML, but it won't tell you if the content makes sense, if all the links actually link to something, how the page looks in different sized displays/devices, how well Google will understand what it's about, etc.

    Ultimately, HTML is easy, it's just a text mark-up language with no program flow control, data processing, and so forth. Using a programming language to write software is another kettle of fish: it by no means has to be rocket science for most web programming, but there is a lot more to it than just learning the syntax. I'm not trying to scare you off, just help you realize it's a different sort of thing that will have a much higher learning curve. But if you found learning HTML and CSS to be fairly easy, then you probably have a logical mind, which is a good starting place. Just be aware that there is a lot more to learn to write non-trivial software, but it's also, for me anyway, a lot more interesting and rewarding.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Dec 2013
    Posts
    57
    Quote Originally Posted by NogDog View Post
    There are syntax checkers built into most decent code editors that will tell you if you have made relatively simple errors in using the language, but that's the easy part. That won't tell you whether the program does what you want it to do, or just as importantly, that it does not do things you don't want it to do. That's where various types of testing come into play (unit tests, integration tests, system tests, load tests, performance tests, and so forth).

    But then that's the same with HTML: a validator will tell you if you have well-formed HTML, but it won't tell you if the content makes sense, if all the links actually link to something, how the page looks in different sized displays/devices, how well Google will understand what it's about, etc.

    Ultimately, HTML is easy, it's just a text mark-up language with no program flow control, data processing, and so forth. Using a programming language to write software is another kettle of fish: it by no means has to be rocket science for most web programming, but there is a lot more to it than just learning the syntax. I'm not trying to scare you off, just help you realize it's a different sort of thing that will have a much higher learning curve. But if you found learning HTML and CSS to be fairly easy, then you probably have a logical mind, which is a good starting place. Just be aware that there is a lot more to learn to write non-trivial software, but it's also, for me anyway, a lot more interesting and rewarding.
    Is there any book(s) that you found helpful with learning php?

    Thanks for the response. I appreciate that.

  6. #6
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,247
    I don't really know what the best beginning books are these days. I started learning PHP over a decade ago, and a lot has changed since then. I might start here on the O'Reilly site, and see if there are any books with decent ratings that target beginning developers (preferably one that includes both PHP and MySQL).

    Also search the web for "wampserver" (Windows only) or "XAMPP", which provide installers to help you install and configure PHP, MySQL, and Apache on your own computer so that you have a local web server you can experiment and develop on.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  7. #7
    Join Date
    Feb 2013
    Posts
    87
    Larry Ullman has a good series of books on PHP - I read one of his books on PHP OOP. http://www.larryullman.com/

  8. #8
    Join Date
    Dec 2013
    Posts
    4
    You can definitely learn how to write php alone. The key for myself, as I'm not the quickest at picking things up, was to be persistent and not to lose heart in what I was trying to do.

    If its web development you're wanting to do then HTML and CSS would be a better subjects to learn first.

    I initially found some good tutorials on Lynda.com which taught me the basics of the php language I think the author was a guy called Larry Ullman or something like that.

    Last Christmas my brother bought me a book by Lorna Mitchell (http://shop.oreilly.com/product/9780987090874.do) I was lucky enough to have a couple of weeks with her on a course (paid by the company I work for), but the book basically covers everything she taught. I use the book only for reference but its a good book.

    Best website in my opinion is php.net (http://www.php.net/manual/en/langref.php) It has everything!

    The best advice I could give is.... Get stuck in!

    You can watch videos, read books and ebooks but nothing can help you more than physically doing something. Give yourself a small project to do, set yourself a time to do it in and give it a good go.

    Best of luck and enjoy!!

  9. #9
    Join Date
    Oct 2012
    Posts
    39
    Start with HTML, then do PHP, CSS and JavaScript.

    Install XAMPP on your computer, and work your way through a book on PHP that you enjoy. (Emphasis on the word 'work' -- don't just read it.)
    I am Creating Website for Businesses and Brands to build up online presence.

  10. #10
    Join Date
    Dec 2013
    Posts
    6
    Quote Originally Posted by parkerfrank32 View Post
    Start with HTML, then do PHP, CSS and JavaScript.

    Install XAMPP on your computer, and work your way through a book on PHP that you enjoy. (Emphasis on the word 'work' -- don't just read it.)
    It is a great step to start programming use PHP...you can visit w3schools as your tutorial. Nice Try

  11. #11
    i think start with html and css, then do php and basic javascript.

  12. #12
    Join Date
    Feb 2014
    Posts
    14
    You can try codecademy.com, will help you get the basics down

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles