I want to learn PHP

mr_mithun73

New Member
Messages
3
Reaction score
0
Points
0
Hello, I am little interested to learn PHP. But I do not know from where to start. Can anyone help me?
 

mjaoune5571

New Member
Messages
13
Reaction score
0
Points
0
For better results, you should first learn: HTML,CSS,Javascript and then start learning PHP. Also it would be easier if you have some experience with a computer programming language, since the syntaxes are not that different.
 

garrette

New Member
Messages
27
Reaction score
0
Points
0
Personally, I would start with html and css because they are very, very easy to learn (in my opinion). Once i learned those I personally went on on to learn C++ from a website online, learncpp.com, and I found that very helpful to learning php and javascript. The tutorial is very easy, and explains a lot about variables, strings, and functions, as well as the different values. These being int, char, varchar, bool, and a lot of others, which will come in handy when dealing with php.

It will take a while, so you should have some patience, but in my own opinion learncpp.com is a great place to get a start with programming, especially if you haven't had much experience with it before. Not only that, but you can easily run it using the cmd on your computer, so you don't really need any tools.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
See "New to PHP, Point in the right direction". There are already many threads in this forum and elsewhere with info on where to learn programming and development.

Note that while learning HTML and CSS is a necessary first step for web development, neither involves programming. Also make sure the sources you use don't use outdated or incorrect concepts. HTML is about document structure. Any site that doesn't discuss HTML in terms of structure and semantics is getting it wrong.


[...] the different values. These being int, char, varchar, bool, and a lot of others, which will come in handy when dealing with php.
These look to be SQL types. Programming is a subtle discipline, and making a distinction between such things as values and a types, and among parts of different languages is of prime importance. Failing to distinguish things that are different is a fatal mistake, programming-wise.


One of the best sources to learn programming is Structure and Interpretation of Computer Programs (SICP, or the Wizard Book). It covers programming in terms of Scheme, not PHP, but programming doesn't depend upon understanding a particular language. The syntax of Scheme is one of the simplest. Pretty much all the syntax you need to know is summed up by:

Code:
-- abstraction
(define (f x)
  (- (* x x) 1))

-- application
(f 1)
-- variables
(define x 2)
(f x)


One issue with LearnCpp is it teaches Systems Hungarian notation. Despite the claims on the site, Systems Hungarian is almost universally recognized as being problematic and has been abandoned, even by Microsoft, where it originated.
 
Last edited:

ellescuba27

Member
Messages
273
Reaction score
3
Points
18
PHP is really kind of like a whole other version of HTML with the same stuff, but also has some more loaded into it.. So i would go to w3schools.com because they have a great tutorial for HTML. My friend learned it that way and you can trust them to be up to date. You must know HTML before learning PHP. Then you go on to PHP.

Javascript and CSS would be good to learn as well because CSS adds style to your page and Javascript allows for user interactivity with your site.

EDIT: Ok, w3schools actually is an untrustable source.
 
Last edited:

Quozzo

New Member
Messages
11
Reaction score
0
Points
0
PHP is nothing like HTML. HTML is a mark-up language whereas PHP is an OOPL (Object Orientated Programming Language) that has more akin to JavaScript. HTML is used as the building blocks of a website but PHP is used for oh so much more. A mark-up language is static and doesn't do anything other that look pretty for the browser similar to text on a piece of paprer, but PHP allows for functions, maths, and everything in between, like a computer!
 

garrette

New Member
Messages
27
Reaction score
0
Points
0
PHP is really kind of like a whole other version of HTML with the same stuff, but also has some more loaded into it.. So i would go to w3schools.com because they have a great tutorial for HTML. My friend learned it that way and you can trust them to be up to date. You must know HTML before learning PHP. Then you go on to PHP.

Javascript and CSS would be good to learn as well because CSS adds style to your page and Javascript allows for user interactivity with your site.

EDIT: Ok, w3schools actually is an untrustable source.

Not to be mean, but I actually lol'd at this post, don't use W3schools, and html is nothing like php. But, the two do go together when developing websites. The most similar language to php that I have learned so far would have to be C++, which is much easier to test since it can be done using the cmd on your computer. In fact, I've even heard word of a converter that will translate C++ to php. While mission did point out that learncpp does their programming in hungarian notation, I still believe it is a great learning resource to use.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
While mission did point out that learncpp does their programming in hungarian notation, I still believe it is a great learning resource to use.

LearnCpp overall does seem to provide good information. I've only skimmed it, but so far the information that is off is only slightly off. While they may cause problems at some point, the points that are off are generally edge cases and are better covered later. It's also not quite comprehensive, but (as an introductory tutorial) it doesn't have to be. Object slicing, for example, isn't mentioned, though it's implicitly hinted at by §12.1 "Pointers and references to the base class of derived objects".

Note: you've added an extra "i" to my handle. What does my sig say? :)
 

company4

New Member
Messages
6
Reaction score
0
Points
1
Hi,

I'm a PHP developer and usually I get asked that question a lot and I find that the best place to start is http://www.w3schools.com/ . This is where I have pointed a lot of people who are interested because the site shows you the basics and some advanced development at which point you can attempt to build an application yourself. I always go there if I'm interested in learning something new and quickly.

Hope it helps.
 

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
Hi,

I'm a PHP developer and usually I get asked that question a lot and I find that the best place to start is http://www.w3schools.com/ . This is where I have pointed a lot of people who are interested because the site shows you the basics and some advanced development at which point you can attempt to build an application yourself. I always go there if I'm interested in learning something new and quickly.

Hope it helps.
w3schools really isn't cool, it's terrible!

http://w3fools.com/
 

macz.diamonds61

New Member
Messages
21
Reaction score
0
Points
0
The best resource to learn PHP really is php.net. There are a lot of tutorials out there that can be found on Google on basic structure of php and how to keep your code clean and friendly. Once you have the basics down use php.net and do research, practice and keep at it until you get it.

If you go to php.net and click on the getting help nav link at the top of the page it gives you a good list of how to find the best help and support for learning php.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
One of the best sources to learn programming is Structure and Interpretation of Computer Programs (SICP, or the Wizard Book). It covers programming in terms of Scheme, not PHP, but programming doesn't depend upon understanding a particular language. The syntax of Scheme is one of the simplest.

And just to follow up on that a bit, for those who have trouble with extracting the goodness out of books, there's a 20-lecture video series of SICP available for free online. It's from a ten-day compressed version of the MIT 6.001 course given to Hewlett Packard employees. Lectures 1a to 5b (the first ten) are the core of programming principles. The last ten are interesting, but are kind of advanced and may not seem to have much application to the typical CRUD (create, read, update, delete) PHP+MySQL web application until you get enough experience under your belt to start thinking about designing your own "language" on PHP (the next step beyond procedural and object-oriented programming). The lectures are based on an older version of the book, so there isn't a one-to-one correspondence, but they will help.

For a quick intro to PHP+MySQL, something you can do in a week (or even a weekend), Head-First PHP & MySQL isn't horrible. It's outdated, uses the soon-to-be-deprecated mysql extension, and doesn't touch at all on best practices, so it should not be looked upon as something that will teach you all, or even most, of what you want to know. It's not worth the money to buy unless you have money to spare -- you won't want to keep it around as a reference once you've gone through it once -- but that's why they invented libraries. What it will do is give you the vocabulary to understand the better references (suggested in misson's links) you'll use later.

(Don't let the book's thickness intimidate you. The Head First series is, well, different, with a lot of illustrations and so on surrounding the concepts they teach. Tech-heads tend to hate Head First books -- you could compress all of the "vital information" in HFPHP into maybe fifty pages, so why didn't they do that? In my experience teaching adults, "ordinary people" tend to learn more quickly and more easily using this approach.)
 
Top