PDA

View Full Version : how does one learn PHP?



anon0
December 20th, 2011, 02:43 PM
I'm an ultra n00b who has exremely deep philosophical questions such as why the following doesn't do anything on my default Ubuntu LAMP server:
<html>
<head>
<title>Example</title>
</head>
<body>
<?php echo “Hello World!”; ?>
</body>
</html>

Where can I get some hand-holding?

Update: wow apparently the code goes into a .php file, that was like sooo deep. Anyway, I'd appreciate advice on how best to learn and where to ask questions.

surfer
December 20th, 2011, 02:53 PM
did you install all the necessary packages (such as apache2 php5 libapache2-mod-php5)?

and this may help:
https://help.ubuntu.com/community/ApacheMySQLPHP

anon0
December 20th, 2011, 03:28 PM
yeah Ubuntu Server included the LAMP package during installation.

I know the installation instruction has some information but I'm just asking for advice on learning. Like, where did you developers ask for help when you started out, or did you learn everything independently? I assume this forum is not the best place to discuss programming questions.

CoffeeRain
December 20th, 2011, 03:49 PM
I just started out with an idea for a website, and kept looking what I needed to know up. I used the w3schools.com. They can be unreliable sometimes, but a good place to start.

sandyd
December 20th, 2011, 04:20 PM
Check out Daniweb.

Dragonbite
December 20th, 2011, 07:13 PM
I learned PHP from a combination of books, online and just doing a project.

I work best when I have a project to focus on and ask myself "I want to do xyz, how do I do that?" and research it until I figure it out.

I also use my experience in doing it in ASP and ASP.NET which includes not only books and online but classes in ASP.NET as well.

Recently I got into the company's PHP website and seeing how they have that running I am looking to implement some of it into my own sites.

philinux
December 20th, 2011, 07:31 PM
Moved to Programming talk.

matt_symes
December 20th, 2011, 07:36 PM
Hi

Start here

http://www.w3schools.com/php/default.asp

You've set the correct permissions ? What is your current setup ? Tell us what you have done so far.

Kind regards

lisati
December 20th, 2011, 07:41 PM
One of the main applications of PHP is for producing dynamically produced web pages. It can also be used for command-line scripts, but there are often better ways of doing that.

I learned what little I know about PHP by choosing a project to work on, and searching for tips and techniques through Google. The PHP manual (http://php.net/manual/en/index.php) is a useful resource.

w3develop
January 25th, 2012, 10:46 AM
Try PHP Tutorial (http://www.w3resource.com/php/php-home.php) and MySQL tutorial (http://www.w3resource.com/mysql/mysql-tutorials.php) of w3resource.com. Plenty of examples and most of the MySQL queries are accompanied by PHP code. You can also practice PHP with their online practice editor.

epicoder
January 25th, 2012, 03:58 PM
php.net is always an excellent resource to draw from for learning. I like it because you can look up extensive documentation and user notes on any built-in function, as well as many modules.

Pioden
January 27th, 2012, 03:02 PM
My advice would be to buy a good 'begining PHP' book from Amazon and work through that. That's what I did. :)

Once you have an idea what you're doing with PHP then reference sites like php.net are fantastic. I'd also suggest you invest in some good reference books (dead trees) as they can be really useful when you hit a problem.