Where's a good start to get into PHP? I didn't see a sticky so I assume it's okay to make a topic.. Basically I'm not new to programming, I know how it works yada yada.
I just want to get into web development and learn PHP fluently.
What's the best way to learn PHP?
I have read the tutorials on w3 schools and some other sites and I know the basics of PHP but I'm looking to extend my knowledge further.
Would creating a website be the best way to go about it?
Personally, I found that making websites was the best way for me to learn to program PHP. Start off small, perhaps code a blog, then maybe a forum. This way you'll learn it in more practical circumstance's, which I believe is the best way to learn.
Also, by creating website's you'll also get a really healthy grasp of JavaScript, HTML and CSS which will help you in your web development trails.
I agree with JDream.
Make a blog or register/login/post news system at first and then grow to bigger things.
[url]http://w3schools.com/php/php_intro.asp[/url]
GG reading the OP Maccabee.
To be honest, take a look at some simple Ruby or Python web frameworks instead. These will allow you to get into the concept of not having a bunch of PHP files in the public HTTP directory, but using an object-oriented methodology to render your pages in the first place.
The way PHP works shows how it was designed to be a template engine in the first place - mixing PHP code with HTML. That's now how to write clean code.
For example, try [url=http://webpy.org/]Web.py[/url] with a template engine like [url=http://jinja.pocoo.org/2/]Jinja[/url], or [url=http://www.sinatrarb.com/]Sinatra[/url] with [url=http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html]ERB[/url] for templating.
Afterwards, take a look at bigger frameworks like Pylons, Django or Rails.
[QUOTE=JDream;21462379]Start off small, perhaps code a blog, then maybe a forum. [/QUOTE]
Hrm, A forum isn't really small, It's kinda big and difficult.
Unless it's a quick not user based board just to screw with.
I think a guestbook could be a good small start.
Make something small but make sure you emphasize good programming techniques with it. People who write PHP often write shitty code.
Will do. Thanks everyone for the help.
Making a forum isn't very difficult.. The hard part is additional features and so.
[QUOTE=andersonmat;21469598] People who write PHP often write shitty code.[/QUOTE]
You base this on what exactly?
It's a langauge with an extremely low barrier to entry so every man and his dog can dive in and start writing shity code (everyone codes shittily at first, it's just that PHP is often chosen as a first language) while thinking they're a programming god
[editline]10:03PM[/editline]
Also, [sp]PHP is a horrible language[/sp], but I don't want to start a flame war
[QUOTE=turb_;21545799]Also, [sp]PHP is a horrible language[/sp], but I don't want to start a flame war[/QUOTE]
- Yes you do, else you wouldn't have posted it..
Also no matter how you put it, your statement is nothing but an opinion..
[quote]It's a langauge with an extremely low barrier to entry so every man and his dog can dive in and start writing shity code[/quote]-Lots of people start out with Java or python when they want to learn how to write REAL applications, does that make these languages or the majority of the users of these languages shitty by default ?
[QUOTE=zyxxyz;21468284]To be honest, take a look at some simple Ruby or Python web frameworks instead. These will allow you to get into the concept of not having a bunch of PHP files in the public HTTP directory, but using an object-oriented methodology to render your pages in the first place.
The way PHP works shows how it was designed to be a template engine in the first place - mixing PHP code with HTML. That's now how to write clean code.
For example, try [url=http://webpy.org/]Web.py[/url] with a template engine like [url=http://jinja.pocoo.org/2/]Jinja[/url], or [url=http://www.sinatrarb.com/]Sinatra[/url] with [url=http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html]ERB[/url] for templating.
Afterwards, take a look at bigger frameworks like Pylons, Django or Rails.[/QUOTE]
PHP has frameworks too, efeX, like CodeIgniter.
[QUOTE=reeferdk;21545904]- Yes you do, else you wouldn't have posted it..
Also no matter how you put it, your statement is nothing but an opinion..
-Lots of people start out with Java or python when they want to learn how to write REAL applications, does that make these languages or the majority of the users of these languages shitty by default ?[/QUOTE]
Goto some discussion groups or the [java] tag on SO and you'll see my point about noobs writing shit code. As for python, I actually haven't seen much python code so I couldn't tell you
[QUOTE=reeferdk;21545778]You base this on what exactly?[/QUOTE]
I base it upon all of the code I see posted here. It's a very loose language to write in.
[QUOTE=andersonmat;21547093]I base it upon all of the code I see posted here. It's a very loose language to write in.[/QUOTE]
php is designed more than anything to be agile. Yes there are languages that are more formed, and demand greater discipline, but you certainly can't roll them out as fast. Where I work, we use php along with a number of php based CMS's, and for the really big shit we break out Django. It works.
I can write code in more complex and structured languages as fast as I can write PHP. At then end of the day, those other languages like C++ and C# are going to run faster on a web server than PHP.
Personally, I've coded in PHP for years, to the point where I know pretty much every feature. However, once I learnt about the way C# and ASP.NET work, I don't even want to attempt to code in PHP anymore.
I wish that my favorite dev tools weren't on OSX and that everything I work on didn't use PHP. :(
[QUOTE=arienh4;21549912]Personally, I've coded in PHP for years, to the point where I know pretty much every feature. However, once I learnt about the way C# and ASP.NET work, I don't even want to attempt to code in PHP anymore.[/QUOTE]
ASP.net is just a silly framework.. Really! (Everything in a single form is not always the best solution.. Infact its rarely a good solution)
9/10 sites i see made in ASP.net rarely works as intended..
You have zero control of the output you will get in ASP.net (As said everything is in a single form, and it will throw in 10-20 hidden input fields free of charge)
Only positive thing i can say about ASP.net is that the layout and the code is seperated.. (And you can get around that in PHP by using a template system)
Oh and since ASP.net is the preferred language for multimediadesigners (here in Denmark atleast) i will make the bold statement that alot of ASP.net programmers write shitty code.
[QUOTE=reeferdk;21550532]ASP.net is just a silly framework.. Really! (Everything in a single form is not always the best solution.. Infact its rarely a good solution)
9/10 sites i see made in ASP.net rarely works as intended..
You have zero control of the output you will get in ASP.net (As said everything is in a single form, and it will throw in 10-20 hidden input fields free of charge)
Only positive thing i can say about ASP.net is that the layout and the code is seperated.. (And you can get around that in PHP by using a template system)[/QUOTE]
:wtc:
I personally don't even write much with ASP.net. I more so use C++. :downs:
PHP is a quick fix but if you want something fast, you use a lower-level language. Hell, if you want quick and dirty use Perl or Ruby.
[QUOTE=reeferdk;21550532]ASP.net is just a silly framework.. Really! (Everything in a single form is not always the best solution.. Infact its rarely a good solution)
9/10 sites i see made in ASP.net rarely works as intended..
You have zero control of the output you will get in ASP.net (As said everything is in a single form, and it will throw in 10-20 hidden input fields free of charge)
Only positive thing i can say about ASP.net is that the layout and the code is seperated.. (And you can get around that in PHP by using a template system)
Oh and since ASP.net is the preferred language for multimediadesigners (here in Denmark atleast) i will make the bold statement that alot of ASP.net programmers write shitty code.[/QUOTE]
waiting for a turby reply
PHP is a fine language, why you guys hate it :(
[QUOTE=reeferdk;21550532]ASP.net is just a silly framework.. Really! (Everything in a single form is not always the best solution.. Infact its rarely a good solution)
9/10 sites i see made in ASP.net rarely works as intended..
You have zero control of the output you will get in ASP.net (As said everything is in a single form, and it will throw in 10-20 hidden input fields free of charge)
Only positive thing i can say about ASP.net is that the layout and the code is seperated.. (And you can get around that in PHP by using a template system)
Oh and since ASP.net is the preferred language for multimediadesigners (here in Denmark atleast) i will make the bold statement that alot of ASP.net programmers write shitty code.[/QUOTE]
[url=http://www.asp.net/mVC/]ASP.NET MVC[/url] is probably what turby would want you to use. None of that silly web forms stuff.
[QUOTE=Tuntis;21551639][URL="http://www.asp.net/mVC/"]ASP.NET MVC[/URL] is probably what turby would want you to use. None of that silly web forms stuff.[/QUOTE]
Looks interresting.. I might have a look at this someday
[QUOTE=reeferdk;21550532]ASP.net is just a silly framework.. Really! (Everything in a single form is not always the best solution.. Infact its rarely a good solution)
9/10 sites i see made in ASP.net rarely works as intended..
You have zero control of the output you will get in ASP.net (As said everything is in a single form, and it will throw in 10-20 hidden input fields free of charge)
Only positive thing i can say about ASP.net is that the layout and the code is seperated.. (And you can get around that in PHP by using a template system)
Oh and since ASP.net is the preferred language for multimediadesigners (here in Denmark atleast) i will make the bold statement that alot of ASP.net programmers write shitty code.[/QUOTE]
[url=http://anyhub.net]AnyHub[/url] uses ASP.NET WebForms (I took one look at MVC and :psyboom:)
Look at the source, is it all fucked up? No. I have FULL control of output. It's only when you start using the stupid shit like postbacks and server side events where shit starts fucking up.
Sorry, you need to Log In to post a reply to this thread.