Best way to learn PHP

Inferno0032

Golden Member
Mar 26, 2007
1,107
0
71
Been running into need for PHP skills alot lately, and would like to start learning. Is picking up a book probably the best way for me to do so for learning on my free time?

Have any recommendations?
 

TheKub

Golden Member
Oct 2, 2001
1,756
1
0
LAMP. Its all free.

I'm far from an expert but I can do it in a pinch. Never had a book there are enough tutorials on the web to get you to "hello world" and beyond.

Short answer, just do it.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,584
4,495
75
Do you have any programming experience? That could make a big difference in what you need. Personally, I'm to the point that once I get the syntax, a reference is all I want or need.

P.S. If I were you, I'd learn PHP with classes, too. :p
 

Inferno0032

Golden Member
Mar 26, 2007
1,107
0
71
No programming experience, only extremely basic HTML, so I think I should start with HTML, and that will help alot.

Will be taking C/C++ come fall.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Originally posted by: VinylxScratches
The syntax for PHP makes me want to gouge my eyes out.

It's close enough to C++ not to bother me much. What I hate is the lack of strong typing and the single-step debugging I have in Visual Studio.

$item1 = 5 ;
$item2 = 8 ;
$result = $iten1 + $item2 ; // no errors, but doesn't == 13 !

grrrr.

 

Snapster

Diamond Member
Oct 14, 2001
3,916
0
0
Originally posted by: DaveSimmons
Originally posted by: VinylxScratches
The syntax for PHP makes me want to gouge my eyes out.

It's close enough to C++ not to bother me much. What I hate is the lack of strong typing and the single-step debugging I have in Visual Studio.

$item1 = 5 ;
$item2 = 8 ;
$result = $iten1 + $item2 ; // no errors, but doesn't == 13 !

grrrr.

This ^^ Also best way to learn is to do, even a random php book/pdf will get you on the way.
 

Teching

Banned
Jun 28, 2009
19
0
0
Originally posted by: DaveSimmons
Originally posted by: VinylxScratches
The syntax for PHP makes me want to gouge my eyes out.

It's close enough to C++ not to bother me much. What I hate is the lack of strong typing and the single-step debugging I have in Visual Studio.

$item1 = 5 ;
$item2 = 8 ;
$result = $iten1 + $item2 ; // no errors, but doesn't == 13 !

grrrr.

Well of course doesnt == 13, because you are adding $iten1, not $item1 :p
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
^ of course, but in C++ the compiler would save me from my typo by reporting $iten as an undefined variable and as being used before being assigned a value. It would also be obvious single-stepping through the code that iten contained a garbage value.
 

Woosta

Platinum Member
Mar 23, 2008
2,978
0
71
Originally posted by: DaveSimmons
^ of course, but in C++ the compiler would save me from my typo by reporting $iten as an undefined variable and as being used before being assigned a value. It would also be obvious single-stepping through the code that iten contained a garbage value.

All you'd have to do is turn on error_reporting with error_reporting(E_ALL); and you'll get "Undefined variable: iten1".

Not that I really like or favor PHP...