Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > learning php

learning php
Thread Tools
tracemhunter
Forum Regular
Join Date: Jul 2005
Status: Offline
Reply With Quote
Aug 9, 2005, 10:54 AM
 
i am wanting to learn php badly but do not know where to start. should i get one of those books or what?
     
Phil Sherry
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Aug 9, 2005, 11:00 AM
 
Yeah, I'd get one of those books.
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Aug 9, 2005, 06:59 PM
 
If you have any programming experience at all, PHP is incredibly easy. I just looked at a few sample scripts and read the online documentation.
     
nonhuman
Posting Junkie
Join Date: Jun 2001
Location: Baltimore, MD
Status: Offline
Reply With Quote
Aug 9, 2005, 08:15 PM
 
I don't know about PHP specifically, but O'Reilly makes really good books for learning various programming languages.

But if you have any programming experience at all, it probably isn't necessary. PHP uses C-ish syntax, and has very good online documentation (at php.net). It's a very easy to use language.
     
jay3ld
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Aug 10, 2005, 12:58 PM
 
just do what they said and start your self very simple like just getting php to echo what you type

Code:
<?php echo "Hello"; ?>
then you should be able to go more on when you start to get the feel of all the basics of php
     
himself
Mac Elite
Join Date: Jan 2002
Location: Live at the BBQ
Status: Offline
Reply With Quote
Aug 10, 2005, 04:23 PM
 
I was able to get a grasp on php because I had learned ActionScript for Flash about a year ago... they (and Javascript) are very similar. But it wasn't until I started using Dreamweaver's php tools that I had my epiphany. So, try constructing some php scripts with an application like Dreamweaver, and then dissect it to see how it works.
"Bill Gates can't guarantee Windows... how can you guarantee my safety?"
-John Crichton
     
mhuie
Dedicated MacNNer
Join Date: Sep 2004
Location: Seattle
Status: Offline
Reply With Quote
Aug 10, 2005, 07:36 PM
 
Originally Posted by tracemhunter
i am wanting to learn php badly but do not know where to start. should i get one of those books or what?
Go to the php website and start reading the docs. Lots of samples and comments.
MBP 1.83
     
tracemhunter  (op)
Forum Regular
Join Date: Jul 2005
Status: Offline
Reply With Quote
Aug 11, 2005, 08:45 PM
 
ok. i know html for the most part but i think i will mess with dreamweaver and try php.net. thanks for the help.
     
selowitch
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Aug 11, 2005, 10:01 PM
 
Originally Posted by tracemhunter
ok. i know html for the most part but i think i will mess with dreamweaver and try php.net. thanks for the help.
PHP is awesome. You won't regret it. It's free, it's reliable, powerful, and fast. I love it.

And for me, it's the first scripting language I ever learned, unless you count an abortive experience with ColdFusion (*vomit*) and my fondness for AppleScript, which is a somewhat different animal — i.e., a desktop language that is not usually executed on a web server, except in very special situations.
     
tracemhunter  (op)
Forum Regular
Join Date: Jul 2005
Status: Offline
Reply With Quote
Aug 11, 2005, 10:22 PM
 
this is going to be my first language to learn. i know nothing about programming whatsoever but i know people that do and if they can then i sure as hell can. i will work on it during my summer break (15th - 29th)
     
selowitch
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Aug 11, 2005, 10:27 PM
 
Originally Posted by tracemhunter
this is going to be my first language to learn. i know nothing about programming whatsoever but i know people that do and if they can then i sure as hell can. i will work on it during my summer break (15th - 29th)
Well, if you're reasonably bright and willing to stick with it, you will find it a very rewarding experience. It sure has been for me!
     
tracemhunter  (op)
Forum Regular
Join Date: Jul 2005
Status: Offline
Reply With Quote
Aug 11, 2005, 10:42 PM
 
i just got an error when trying to create a php file in text edit. i am use to just saving a file as .html in windows through notepad and thought you could do the same
     
selowitch
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Aug 11, 2005, 10:44 PM
 
Originally Posted by tracemhunter
i just got an error when trying to create a php file in text edit. i am use to just saving a file as .html in windows through notepad and thought you could do the same
Do not despair, young Padawan. :-)

It won't work with the .html extension. You need to use the .php extension or else the server won't understand that it needs to execute the file as PHP code.

Hence, "index.php" will work, but "index.html" or "index.htm" will not if there's any PHP code within.

However, a better first step is to see if PHP is correctly installed on your server, using this code:
Code:
<?php phpinfo(); ?>
Good luck!
     
tracemhunter  (op)
Forum Regular
Join Date: Jul 2005
Status: Offline
Reply With Quote
Aug 11, 2005, 11:26 PM
 
nvm i got it. had to install the server on my windows box. but i am getting everything down. havnet had anything go wrong yet. but i am just getting started. i have to study for finals tonight so i will mess with it at another time.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:43 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,