Welcome to Dream.In.Code
Become a PHP Expert!

Join 150,201 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,999 people online right now. Registration is fast and FREE... Join Now!




The PHP Easy Start Guide

2 Pages V  1 2 >  
Reply to this topicStart new topic

The PHP Easy Start Guide

JBrace1990
28 Sep, 2008 - 05:47 AM
Post #1

D.I.C Regular
Group Icon

Joined: 9 Mar, 2008
Posts: 479



Thanked: 24 times
Dream Kudos: 350
My Contributions
Lately, there have been several people asking "What is the best way to learn PHP?", and while we don't mind helping you, it is starting to become a little repetitive.

First thing first, PHP is NOT easy to master, however it is easy to learn. The difference is that in NO way will you be making an online game in PHP as soon as you start learning it. Games are incredibly complex, and take a lot of time, work, and determination to finish. I have Started about five games, and only one of them is up and still being worked on.

1. Hosting

Before everything else, if you really want to learn PHP, you will learn it by doing. Fist off, you will need some type of hosting.

1.1 Free Hosting
As there is plenty of free hosting out there, That may be the way to go, and it has several advantages and disadvantages.

Advantages:
  • It's Free
  • It's accessible from the Web, meaning people can help you, see error pages that occur, Etc.
  • No need to use up Disk Space on your computer for something such as WAMP (detailed later on)

Disadvantages:
  • Most of the sites usually have great restrictions (IE: possible advertising, irremovable footers, HUGE limits on BandWidth)
  • If the server encounters a problem, don't expect a letter to them to do anything. They offer it to you free, and therefore don't "need" to keep it up for you.

Links:
Freehostia
Geocities
Listings

1.2 Dedicated Server

Advantages
  • Servers usually have 99.9% uptime guaranteed (meaning they will reimburse you if they're down too long)
  • PHP and MySQL are usually included in the package
  • If something happens, chances are they are already at work fixing it for you
Disadvantages
  • Costs to host (though generally cheap)

1.3 Local Machine Server
Yes, it IS possible to install Apache, PHP, and MySQL onto your PC, regardless of if it is Linux, Windows, or other.

Advantages:
  • You can control all of the options of PHP, MySQL, AND Apache, involving things such as Mod-Rewrite
  • No external provider to deal with
  • 100% uptime when you need it, All you need to do is turn it on, and it works if you installed it correctly
  • Free

Disadvantages:
  • Uses internal Disk Space (not a lot, but enough to mention)
  • Large operations may take a while to work with, as it is limited by your CPU and RAM (though generally not a BIG disadvantage, it does occur sometimes on very intense calculations)

Links:
WAMP
XAMPP

1.4 PHPDock
PHPDock is generally overlooked, as I don't think many people know about it. It enables you to build a PHP website, and deploy it with NO internet connection required.

Advantages:
  • Used on your general machine
  • Can create Desktop Applications in PHP

Disadvantages:
  • Expensive ($149)
  • Usually only works well with NuSphere PHPED
  • You're forced to use Internet Explorer to view them

Links:
NuSphere PHPDock

2. Learning

Learning PHP is a delicate process. What you learn, and the way you learn it, influences how you code. That is why it is crucial that you learn it correctly. My suggestion is to go with W3Schools AND Tizag (yes, I said read both).

2.1 W3Schools
W3Schools is where I learned PHP. I still use it when i forget a function or need to look it up. It has a plain basic interface, nothing special, but the knowledge it contains is very helpful, and will lead you towards the right path to programming.

Link:
W3Schools

2.2 Tizag
Tizag is one of the favorites here at DIC, and provides very in-depth, easy to understand tutorials. Their no-frills website has several things about PHP that will help you in the long run.

Link:
Tizag

2.3 Others
There are several PHP learning sites out there. Zend is the company that offers the Send PHP Certification, something you may become interested in getting if your job requires it. LearnPHP.org Has several tutorials that I don't even think DIC has. They go in-depth to several CMS (Content Management Systems), something you may find useful. About.com is another good site for learning, and offers some well written tutorials.

3. PHP Editors

Ok, so now that you have something that can run PHP, and you have begun learning it, the next step is programming it.

3.1 Integrated Development Environment

Advantages:
  • Shows errors in the code along with readable error codes
  • Installs PHP onto your machine
  • Applications can be tested by hitting a "run" command
  • Usually show complete error messages on the run tab (IE: Error and Line on which the error occured)

Disadvantages:
  • Expensive. NuSphere PHPED costs $495.00 for the professional version, and if you're just starting, you might not want to spend any money at all.

Links:
NuSphere PHPED
PHP Designer
PHP Edit

3.2 Notepad
Yes, Notepad can make PHP Files! All you need to do is save it as .php.

Advantages:
  • Free
  • Already installed on your system (for Windows Users. For Mac and other users, there should be a similar program)

Disadvantages:
  • No error handling
  • No Debugging
  • Manually have to indent/align your code
  • No highlighting or code Folding


3.3 Notepad++
Notepad++ is a completely Free PHP Editor. It offer code highlighting and folding, as well as editors for several languages.

Advantages:
  • Free
  • Small Size
  • has a VERY large list of Plugins to increase functionality

Disadvantages:
  • There are a few bugs, but they're few and far between

4. Other Reading

DIC Has several things that you should read if you want to learn php.

4.1 The giant PHP List of Common Problems
I created The giant PHP List of Common Problems to help people with their problems. Most that occur are simple issues, such as wrong Logic, and problems with things such as Headers and Sessions.

Link:
The giant PHP List of Common Problems

4.2 PHP Tutorials
DIC Has several tutorials in their tutorial section built specifically to help you understand PHP. They have basic ones (such as simple login scripts) to more advanced ones (like building a complete CMS).

Link:
PHP Tutorials

4.3 How to get better help on DIC
"How to get better help on DIC" is a guide written by Akozlik. It details common problems that occur when posting on DIC, and how to request the help that you actually need. Many people don't clearly state what it is they need help with, and we shouldn't be expected to read through your entire code looking for errors that we don't know exist.

Link:
How to get better help on DIC

4.4 The PHP Forum
If you need help, don't be afraid to ask! We're here to help you, so long as you help us help you. No cryptic messages, your best English (though we understand not everyone speaks perfect English, and many have it as a second language), and Provide your Code.

DIC Is here to help you help yourself, not to hand everything to you.

Link:
PHP Forum
User is offlineProfile CardPM
+Quote Post

Limitation
RE: The PHP Easy Start Guide
28 Sep, 2008 - 06:21 AM
Post #2

New D.I.C Head
*

Joined: 27 Sep, 2008
Posts: 17


My Contributions
Thank you very much for all this! This stuff will help many users.
Keep it up biggrin.gif
User is offlineProfile CardPM
+Quote Post

Limitation
RE: The PHP Easy Start Guide
28 Sep, 2008 - 06:43 AM
Post #3

New D.I.C Head
*

Joined: 27 Sep, 2008
Posts: 17


My Contributions
Pin this topic tbh.. cool.gif
User is offlineProfile CardPM
+Quote Post

JackOfAllTrades
RE: The PHP Easy Start Guide
28 Sep, 2008 - 08:19 AM
Post #4

Cantankerous Old Fart
Group Icon

Joined: 23 Aug, 2008
Posts: 867



Thanked: 89 times
Dream Kudos: 50
My Contributions
Suggestions:

Local Machine Install Disadvantages:

-- Many broadband providers prohibit the running of servers through the EULA or proactively through the blocking of inbound ports, requiring use of non-standard ports.
-- Dynamic IP adressess are often used, which require the use of a dynamic DNS system such as DynDNS
-- Bandwidth from a home server to the client is often limited, leading to slow download speed for the client.

PHP Editors:
Scite

User is online!Profile CardPM
+Quote Post

JBrace1990
RE: The PHP Easy Start Guide
28 Sep, 2008 - 11:45 AM
Post #5

D.I.C Regular
Group Icon

Joined: 9 Mar, 2008
Posts: 479



Thanked: 24 times
Dream Kudos: 350
My Contributions
I wasn't referring to the Local Machine as an actual web server, I just meant for a testing ground
User is offlineProfile CardPM
+Quote Post

Moonbat
RE: The PHP Easy Start Guide
28 Sep, 2008 - 11:56 AM
Post #6

D.I.C Regular
Group Icon

Joined: 30 Jun, 2008
Posts: 399



Thanked: 23 times
Dream Kudos: 600
My Contributions
This is an amazing guide for anyone starting off on PHP. But the only missing element I saw is a link to the main website of PHP (http://www.php.net/)

This contains a searchable version of the PHP manual. Especially useful is the function reference, so you can look up any standard PHP function.
User is offlineProfile CardPM
+Quote Post

JackOfAllTrades
RE: The PHP Easy Start Guide
28 Sep, 2008 - 03:15 PM
Post #7

Cantankerous Old Fart
Group Icon

Joined: 23 Aug, 2008
Posts: 867



Thanked: 89 times
Dream Kudos: 50
My Contributions
QUOTE(JBrace1990 @ 28 Sep, 2008 - 03:45 PM) *

I wasn't referring to the Local Machine as an actual web server, I just meant for a testing ground


Ah, OK...my bad smile.gif
User is online!Profile CardPM
+Quote Post

JBrace1990
RE: The PHP Easy Start Guide
28 Sep, 2008 - 03:17 PM
Post #8

D.I.C Regular
Group Icon

Joined: 9 Mar, 2008
Posts: 479



Thanked: 24 times
Dream Kudos: 350
My Contributions
I had thought about adding that in when I was working on it, but decided against it because for new users learning PHP, the manual is a little cryptic, not exactly explaining everything in learning terms.
User is offlineProfile CardPM
+Quote Post

Limitation
RE: The PHP Easy Start Guide
29 Sep, 2008 - 04:56 AM
Post #9

New D.I.C Head
*

Joined: 27 Sep, 2008
Posts: 17


My Contributions
QUOTE(JBrace1990 @ 28 Sep, 2008 - 04:17 PM) *

I had thought about adding that in when I was working on it, but decided against it because for new users learning PHP, the manual is a little cryptic, not exactly explaining everything in learning terms.


Yeh I agree, W3Schools is much better wink2.gif
User is offlineProfile CardPM
+Quote Post

akozlik
RE: The PHP Easy Start Guide
29 Sep, 2008 - 10:13 AM
Post #10

D.I.C Addict
Group Icon

Joined: 25 Feb, 2008
Posts: 714



Thanked: 31 times
Dream Kudos: 800
My Contributions
QUOTE(JBrace1990 @ 28 Sep, 2008 - 07:17 PM) *

I had thought about adding that in when I was working on it, but decided against it because for new users learning PHP, the manual is a little cryptic, not exactly explaining everything in learning terms.


Might be a bit cryptic but it's excellent for quick reference. Especially when you're trying to figure out return values and parameters. I would use the PHP.net site not as a place to learn, but as a place to turn to when need to know what something does, but not how it does it. There are so many pre-built functions in PHP so it's nice to have a place to turn for a quick definition.

All in all though this is a great starter guide. As far as text editors though I have to represent PSPad

Oh also, FYI, there are a few free IDEs out there. Specifically what comes to mind is the PHP PDT Add-on for the Eclipse platform. Eclipse can be downloaded here. The add-on can be found here.

User is offlineProfile CardPM
+Quote Post

JBrace1990
RE: The PHP Easy Start Guide
30 Sep, 2008 - 11:40 AM
Post #11

D.I.C Regular
Group Icon

Joined: 9 Mar, 2008
Posts: 479



Thanked: 24 times
Dream Kudos: 350
My Contributions
Could a mod please stick this?
User is offlineProfile CardPM
+Quote Post

akozlik
RE: The PHP Easy Start Guide
2 Oct, 2008 - 11:43 AM
Post #12

D.I.C Addict
Group Icon

Joined: 25 Feb, 2008
Posts: 714



Thanked: 31 times
Dream Kudos: 800
My Contributions
I'm down with seeing this stuck as well. With the school semester starting up we're seeing a lot of questions that are covered on here. Can we get a sticky DIC on this?
User is offlineProfile CardPM
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:59AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month