Computer Hope

Internet & Networking => Web design => Topic started by: Wuai Bel Ree on April 18, 2012, 01:12:44 PM

Title: Ways to learn PHP?
Post by: Wuai Bel Ree on April 18, 2012, 01:12:44 PM
Is this any sort of free resource out there that teaches you PHP and gives you assignments that make you apply what you've learned? I read through the entire PHP section on w3schools and I don't remember (practically) any of it. I can't seem to learn programming languages on my own because I always forget the stuff or I can't discipline myself to read all the information, and I can't count on my school to force-feed information to me because they plain won't teach programming languages outside of web design and their servers don't support PHP and they refuse to get support.

You can give me resources that aren't free. I've got a birthday coming up so I suppose I could get a PHP book for my birthday, though I've been kind of hoping to learn PHP before mid-May to late June. I want to be a freelance web designer while I'm off school, and it seems I won't be able to do that with just the CSS & HTML my school has taught me.
Title: Re: Ways to learn PHP?
Post by: reddevilggg on April 18, 2012, 04:35:27 PM
I googled 'free PHP tutorials' and this was the first on the list. I always go for free myself, especially at the beginner stage.

http://www.homeandlearn.co.uk/php/php.html (http://www.homeandlearn.co.uk/php/php.html)
Title: Re: Ways to learn PHP?
Post by: bobsklarservices on April 20, 2012, 01:12:54 PM
I started looking for something similar lately, and when I looked, I saw something about an ebook called "I Hate Php". I don't remember the site where I got it from, but if you Google it (http://www.google.com/search?q=i+hate+php+ebook), I'm sure you could find it.
Title: Re: Ways to learn PHP?
Post by: Linux711 on April 22, 2012, 03:30:41 PM
The tube of youland  ;D

http://www.youtube.com/watch?v=Txj4mj5yom0 (http://www.youtube.com/watch?v=Txj4mj5yom0)
Title: Re: Ways to learn PHP?
Post by: Rob Pomeroy on April 23, 2012, 04:21:56 AM
Like you, I can't remember all the PHP I've learned.  But one of the reasons why I love PHP so much is because of its excellent online help, so I don't need to remember it all.  And then I learnt the excellent PHP framework CodeIgniter (http://codeigniter.com/), which made everything simpler still.
Title: Re: Ways to learn PHP?
Post by: BC_Programmer on April 23, 2012, 04:43:27 AM
PHP is one of the worst languages I have the displeasure of having to use frequently. But I won't get into why.

Anyway, as with any language, Project Euler is a good start for learning or re-learning. Typically a good idea is to "extend" the project for the language domain. For C#, I used the functional constructs, iterators, and LINQ to work through some of the Project Euler problems in order to learn how to work with continuations, LINQ, and iterators.
Title: Re: Ways to learn PHP?
Post by: Rob Pomeroy on April 23, 2012, 07:05:44 AM
PHP is one of the worst languages I have the displeasure of having to use frequently. But I won't get into why.

I do feel your pain, I really do.  It lacks elegance and consistency and is horrible for the purist OO programmer.

C#.  Ack.  ;)
Title: Re: Ways to learn PHP?
Post by: BC_Programmer on April 23, 2012, 05:31:09 PM
I do feel your pain, I really do.  It lacks elegance and consistency and is horrible for the purist OO programmer.
http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

It has nothing to do with OO purity. PHP isn't a OO language anymore than Perl is. I could tell you loads of problems with C#. It doesn't support metaclasses, static class members can't be inherited, and you cannot define a static interface; it's static evaluation constructs are limited, too, and it's property support doesn't allow for parameters. and so on.
Title: Re: Ways to learn PHP?
Post by: Rob Pomeroy on April 24, 2012, 03:16:15 AM
http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
PHP isn't a OO language anymore than Perl is.

Oh come on, it's much better than it used to be.   :P  We even got (better) namespaces in 5.3.  I've got my fingers crossed for 6. :D
Title: Re: Ways to learn PHP?
Post by: BC_Programmer on April 24, 2012, 03:38:23 AM
Oh come on, it's much better than it used to be.   :P  We even got (better) namespaces in 5.3.  I've got my fingers crossed for 6. :D

It's not necessarily a bad thing that it's OO constructs are limited. Perl's Object Oriented constructs are sort of stapled on too, and it shows. PHP isn't 'supposed' to be an Object Oriented Language, and it's pretty much impossible to add coherent Object Oriented constructs while maintaining backward compatibility, and when you do the entire language becomes confusing and unwieldy (case and point: C++).

The problem seems to be that different sections are written using a different "structure" or standard; some libraries are called in a C-like fashion, returning some sort of error code; others return some important object or null; etc. There is no "PHP Style" as there is for most languages; this shows because even the standard library has a lot of inconsistencies :(

I'm not really sure how it got popular, I guess it was just in the right place in the right time. It was the first language, to my knowledge, that was designed (a more appropriate word might be "grew") around the server-side. It's pretty much the "default" web language.

On the bright side, frameworks such as the one you mentioned can at least insulate you from some of the language's idiosynchrasies. I use PHP on my webhost, even though my host supports Python, as well, because at the time I started it I knew a bit of PHP but pretty much no Python.

It get's the job done, it's just awfully messy at it (though again I imagine various frameworks help with that too)
Title: Re: Ways to learn PHP?
Post by: rajaasad on May 04, 2012, 02:15:01 AM
Hello Wuai Bel Ree,

There are many different online platforms, from where you can learn PHP. Like you mentioned, they will teach you with the help of practical exercises and small projects, how to program in PHP. These include the official PHP website http://php.net/, Lynda.com, totaltraining.com etc.

Using their video tutorials and exercises, you can learn the language very easily and efficiently. For more information and learning the basics of PHP, please visit: http://www.techyv.com/article/basics-php
Title: Re: Ways to learn PHP?
Post by: TheWaffle on May 16, 2012, 03:37:13 PM
Wiki books has one
Title: Re: Ways to learn PHP?
Post by: TheWaffle on May 16, 2012, 03:37:26 PM
http://en.wikibooks.org/wiki/Php
Title: Re: Ways to learn PHP?
Post by: Wuai Bel Ree on May 17, 2012, 09:26:03 AM
I want to have a feature on my website where the home page displays a preview of (and obviously a link to) a random article from the site every day (without going out of the border). Can PHP do this?
Also, can PHP tell how many entries a database has so it can then print the number of entries onto the web page?

What I'm talking about:
(http://i.imgur.com/DNbgF.jpg)

I want to make sure PHP is all I need to learn.
Title: Re: Ways to learn PHP?
Post by: kpac on May 17, 2012, 05:03:48 PM
Yes it can, is the simple answer.
Title: Re: Ways to learn PHP?
Post by: Jason_Martin on June 04, 2012, 11:05:09 AM
phpbuddy.com is a best website to learn PHP and you can also clear your doubts from w3schools.com i also have good experience in it.
Title: Re: Ways to learn PHP?
Post by: Wuai Bel Ree on July 27, 2012, 01:31:53 PM
Alright, I've narrowed down what I'm searching for a tiny bit, and that birthday is 3 days away. Anyone know any resource that has exercises, complemented with an answer key, that make me apply what I've learned? You know, the exercises start out easy, then slowly get harder. I think part of the problem I'm having with learning PHP is that I have no idea where to start practicing it, so it'd be helpful to have something telling me what to do. I didn't see anything indicating exercises in any of the resources posted on this thread so far.

And am I going to need to buy anything outside of a possible book to learn PHP?
Title: Re: Ways to learn PHP?
Post by: bobsklarservices on October 22, 2012, 09:07:12 AM
am I going to need to buy anything outside of a possible book to learn PHP?

I should think not, there's plenty of free PHP hosting out there. Although for testing, I have IIS 7.5 with PHP 5.3 and MySQL 5.5 on my laptop to help me out with all that. Sorry if I'm too late :P
Title: Re: Ways to learn PHP?
Post by: papercupmachine on January 11, 2013, 11:27:30 PM
I'm thinking of getting these three books. Does anyone have good/bad experiences with any of 'em? Are they good for a beginner?

PHP 5  for the Absolute Beginner
http://www.amazon.com/PHP-MySQL-Programming-Absolute-Beginner/dp/1592004946/ref=cm_lm_fullview_prod_2/102-7421431-9620950

PHP For Dummies
http://www.amazon.com/PHP-MySQL-Dummies-Computer-Tech/dp/0470096004/sr=8-1/qid=1170178118/ref=pd_bbs_sr_1/102-7421431-9620950?ie=UTF8&s=books

Web Database Applications with PHP
http://www.amazon.com/Web-Database-Applications-PHP-MySQL/dp/0596005431/ref=cm_lm_fullview_prod_3/102-7421431-9620950
Title: Re: Ways to learn PHP?
Post by: TheWaffle on January 13, 2013, 10:59:51 AM
I have bought and read this book and I found it very helpfull.
http://www.amazon.com/gp/aw/d/1449325572/ref=mp_s_a_1?qid=1358101239&sr=8-2&pi=SL75
Only downside I found was it didn't cover Ajax.