By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,101 Members | 1,463 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,101 IT Pros & Developers. It's quick & easy.

What is the learning curve for PHP?

P: n/a
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?

Thanks
KJW

Mar 30 '07 #1
Share this Question
Share on Google+
26 Replies


P: n/a
K.J.Williams wrote:
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?
Since you already know the basics of programming - conditional
loops, operators, scope, data types, etc - it should be
relatively quick to learn PHP.

The only part that might gum up the works is if you're not
well-versed in HTML/JavaScript.
Mar 30 '07 #2

P: n/a
K.J.Williams wrote:
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?

Thanks
KJW
Hi,

You have both a good background to start learning PHP fast.
In PHP you can work procedural. If you are confortable with the language,
you can start OOP too (no need, just another way of programming, cleaner in
some aspects).

PHP is easy to pick up.

Things to focus on from the start (in my humble opinion)
- Understand HTML forms
- Understand how PHP receives information (superglobal $_GET[] and $_POST[])
from the forms.
- keep paying attention to php.ini. It may seem like a dull piece of
settings in the beginning, but you'll understand more of it as you learn
more PHP. Just keep coming back there. :-)
- use www.php.net always to lookup functions.
Pay attention to the often usefull comments by other users.
- Get a good book (O'Reilly has a few good ones)
- If you recycle other people's code, never copy/paste, but just
rebuild/retype it yourself, using the examplecode only as a reference.
(This increases understanding in my opinion)
- If you plan on using a database, beware SQL injection. This involves
understanding of the database, php.ini (magic_quotes and such), and make it
a habbit of echo'ing all your SQL untill you are comfortable you know what
happens.
- Get a nice editor with syntax highlighting.
- important: make sure you let PHP see all the errors/notices/warning/etc.
(Again in php.ini: error_reporting)
- When confused, come to comp.lang.php, but you found that place already.
;-)
We have an active helpfull community here. This group is one of the
friendliest and helpful usenetgroups I have seen. You never have to wait
long for a response.

And of course: Enjoy!

Regards,
Erwin Moller
Mar 30 '07 #3

P: n/a
K.J.Williams wrote:
A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
PHP's syntax is fairly like C.

- Function calls are "function_name()"

- Lines end in semicolons

- Whitespace is mostly insignificant

- "if", "for", "while" and "switch" syntax is pretty much
the same

- Most of the mathematical, boolean, assignment and comparison
operators are the same

The biggest difference in syntax is that variables in PHP always begin
with a dollar sign, e.g. $foo.

However, PHP is a much higher level language than C. You rarely need to
worry about casting variables to a different type, and never have to deal
with pointers. Strings are a basic data type in PHP, and don't need to be
treated as an array of characters. Indeed, there isn't a character data
type -- characters are just strings with length 1.

PHP has a lot more functions built in to the language, compared to C where
a lot of functionality (e.g. database connectivity, regular expressions,
networking functions) needs to be imported through libraries.

PHP4 has a certain amount of OO support, and PHP 5 has almost as much OO
support as Java does; however, you don't have to use it!
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like bash shell scripting for Linux?
Assuming that your previous programming experience is with GUI or
command-line programming in C/VB, then probably the biggest change you'll
need to make is not the new programming language that you'll need to
learn, but the paradigm shift of moving from desktop programming to web
programming.

With desktop programming, you're drawing objects to the local screen, and
you can draw these objects whenever you like really. With web programming,
your program has no direct access to the screen, keyboard or mouse of the
client machine. All you get told is that someone has requested page X with
query string Y and post data Z. Your program has a few seconds to figure
out what data it needs to send back, assemble that into some HTML and
output that. Then the data goes back to the client, whose machine renders
it to their screen using a mechanism that is beyond your control. Fun, eh?

Seriously, I think the desktop->web paradigm shift is a much bigger leap
than the change of programming language. I'd suggest at first writing a
CGI program, such as a small web forum, in a language you're familiar with
(e.g. C, or bash scripting) at first, and getting a feel for how web
programming as a whole works, and then make the shift to doing it with
PHP, which will then be comparatively easy.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Mar 30 '07 #4

P: n/a
Toby A Inkster wrote:
K.J.Williams wrote:
>Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
With a good background in C, PHP is very easy.
PHP's syntax is fairly like C.
<snip>

Variable scope is worth looking at before you start:
http://uk2.php.net/manual/en/languag...bles.scope.php
The biggest difference in syntax is that variables in PHP always begin
with a dollar sign, e.g. $foo.
He, that's always the gotcha when you switch to PHP from C.
PHP has a lot more functions built in to the language, compared to C where
a lot of functionality (e.g. database connectivity, regular expressions,
networking functions) needs to be imported through libraries.
There are core functions, and then there are functions that need to be
compiled in (but usually are):
http://www.php.net/manual/en/functions.internal.php

It's worth remembering as a PHP noob that chances are, there's already
a function to do it.
PHP4 has a certain amount of OO support, and PHP 5 has almost as much OO
support as Java does; however, you don't have to use it!
If you want OO then it's probably best to go with a language that was
designed that way in the first place.

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
Mar 30 '07 #5

P: n/a
K.J.Williams schrieb:
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
PHP has a C background. A lot of functions that you know from C can be
used with PHP just like you know them. For example, there's the C
coder's much beloved sprintf(). The control strucutres like for() and
if() are also very much like C. PHP also shares with C++ the ability to
mix procedural and object oriented code. As for the VisualBASIC
programmer, there's much logic to gain and there are many oddities to
forget about ;-)
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
First success is easily obtained. That's why PHP is so popular. And the
quality of the online documentation at php.net is just great. The
hardest thing to understand when coding for the web with PHP is to
understand the oddities of the stateless HTTP protocol. You don't have
your PHP app running all day long! A request comes in, your script runs
and produces output and then the script dies. Persistence surviving a
single request has to be obtained by means of session, databases of the
use of shared memory segments.
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?
And how IS shell scripting for Linux for you? You can't assume everyone
feeling the same way about this...

OLLi

--
Kajiggers!
Mar 30 '07 #6

P: n/a
Oliver Grätz wrote:
mix procedural and object oriented code. As for the VisualBASIC
programmer, there's much logic to gain and there are many oddities to
forget about ;-)
What comes to mind is that a BASIC programmer might expect this:
if (func1() and func2()) { func3(); }
to evaluate func2() regardless of what func1() returns.

AIUI. IANABP. Well, not for many many years.

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
Mar 30 '07 #7

P: n/a
Well my friend who uses VB has a problem , AND IVE TOLD HIM MANY TIMES
about this...

HE USES GOTO.... for all of his jump routines in VB.
I said to him that the practice of using goto, is like
a garotte for programmers. How he lives with the frustration
I dont know - thats why I program in C not VB. My conversion
from BASIC to C long ago was caused by GOTO sphagetti code.
C has GOTO too... but I have avoided GOTO like the plague
ever since then and I hope I never use such a thing.

So my friend's concern is importing his tactics of using goto in PHP
from his practice in VB.

I hope PHP does not have a GOTO - no programmer ( except for those in
assembly ) should ever use a goto statement.

Should I assume PHP doesn't have a GOTO for my friends case?

Thanks again

On Mar 30, 2:30 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
K.J.Williams wrote:
A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?

PHP's syntax is fairly like C.

- Function calls are "function_name()"

- Lines end in semicolons

- Whitespace is mostly insignificant

- "if", "for", "while" and "switch" syntax is pretty much
the same

- Most of the mathematical, boolean, assignment and comparison
operators are the same

The biggest difference in syntax is that variables in PHP always begin
with a dollar sign, e.g. $foo.

However, PHP is a much higher level language than C. You rarely need to
worry about casting variables to a different type, and never have to deal
with pointers. Strings are a basic data type in PHP, and don't need to be
treated as an array of characters. Indeed, there isn't a character data
type -- characters are just strings with length 1.

PHP has a lot more functions built in to the language, compared to C where
a lot of functionality (e.g. database connectivity, regular expressions,
networking functions) needs to be imported through libraries.

PHP4 has a certain amount of OO support, and PHP 5 has almost as much OO
support as Java does; however, you don't have to use it!
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like bash shell scripting for Linux?

Assuming that your previous programming experience is with GUI or
command-line programming in C/VB, then probably the biggest change you'll
need to make is not the new programming language that you'll need to
learn, but the paradigm shift of moving from desktop programming to web
programming.

With desktop programming, you're drawing objects to the local screen, and
you can draw these objects whenever you like really. With web programming,
your program has no direct access to the screen, keyboard or mouse of the
client machine. All you get told is that someone has requested page X with
query string Y and post data Z. Your program has a few seconds to figure
out what data it needs to send back, assemble that into some HTML and
output that. Then the data goes back to the client, whose machine renders
it to their screen using a mechanism that is beyond your control. Fun, eh?

Seriously, I think the desktop->web paradigm shift is a much bigger leap
than the change of programming language. I'd suggest at first writing a
CGI program, such as a small web forum, in a language you're familiar with
(e.g. C, or bash scripting) at first, and getting a feel for how web
programming as a whole works, and then make the shift to doing it with
PHP, which will then be comparatively easy.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Apr 2 '07 #8

P: n/a
K.J.Williams wrote:
Should I assume PHP doesn't have a GOTO for my friends case?
There is a proposal for "goto" to be included in PHP 6, but it will
probably not be called "goto". And the one proposed is more like the
Perl concept of goto -- which has virtually nothing in common with the
BASIC goto. The Perl goto is a far more limited statement, which just
allows you to jump out of loops in a particular way.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 2 '07 #9

P: n/a
I was thinking about learning PHP, using PHP+GTK2. Will it let me
write scripts that produce client applications like Java?

Thanks again

On Mar 30, 2:30 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
K.J.Williams wrote:
A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?

PHP's syntax is fairly like C.

- Function calls are "function_name()"

- Lines end in semicolons

- Whitespace is mostly insignificant

- "if", "for", "while" and "switch" syntax is pretty much
the same

- Most of the mathematical, boolean, assignment and comparison
operators are the same

The biggest difference in syntax is that variables in PHP always begin
with a dollar sign, e.g. $foo.

However, PHP is a much higher level language than C. You rarely need to
worry about casting variables to a different type, and never have to deal
with pointers. Strings are a basic data type in PHP, and don't need to be
treated as an array of characters. Indeed, there isn't a character data
type -- characters are just strings with length 1.

PHP has a lot more functions built in to the language, compared to C where
a lot of functionality (e.g. database connectivity, regular expressions,
networking functions) needs to be imported through libraries.

PHP4 has a certain amount of OO support, and PHP 5 has almost as much OO
support as Java does; however, you don't have to use it!
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like bash shell scripting for Linux?

Assuming that your previous programming experience is with GUI or
command-line programming in C/VB, then probably the biggest change you'll
need to make is not the new programming language that you'll need to
learn, but the paradigm shift of moving from desktop programming to web
programming.

With desktop programming, you're drawing objects to the local screen, and
you can draw these objects whenever you like really. With web programming,
your program has no direct access to the screen, keyboard or mouse of the
client machine. All you get told is that someone has requested page X with
query string Y and post data Z. Your program has a few seconds to figure
out what data it needs to send back, assemble that into some HTML and
output that. Then the data goes back to the client, whose machine renders
it to their screen using a mechanism that is beyond your control. Fun, eh?

Seriously, I think the desktop->web paradigm shift is a much bigger leap
than the change of programming language. I'd suggest at first writing a
CGI program, such as a small web forum, in a language you're familiar with
(e.g. C, or bash scripting) at first, and getting a feel for how web
programming as a whole works, and then make the shift to doing it with
PHP, which will then be comparatively easy.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Apr 2 '07 #10

P: n/a
K.J.Williams wrote:
I hope PHP does not have a GOTO - no programmer ( except for those in
assembly ) should ever use a goto statement.
This depends on the language. Occasionally when writing C I've found
that the most readable way of structuring the code is a goto.

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
Apr 2 '07 #11

P: n/a
So today I went to my bookstore to pick up some stuff on
improving my programming skills for PHP.

1. I know HTML but I dont practice CSS in my own code
so I bought Cascading Style Sheets - The Definitive Guide
2nd Ed by Eric A. Meyer, published by O'reilly, to refresh my
memory on this (this book covers CSS2 & CSS2.1). I have tried CSS
on myspace.com and their server was terrible when I was trying
to customize my page layout. I have no idea what their using
but its terrible. The font colors wouldnt not work right.

Aside from that I think CSS is great but I need to practice it
more
so that it is useful with PHP web page generation.

2. I have JavaScript - The Definitive Guide 3rd Ed. by David Flanagan
published by O'reilly. I have had this book for a while so I am
taking the advice of learning to use HTML wtih Javascripting.
There is one problem with Javascripting ( and HTML ) the features
of
of the langauge is not totally universal with IE or Mozilla/Firefox/
Netscape
so in every Java Script, there has to be a conditional statement
which
catches the web browsers type and use the best most procedures -
this might
make my work with PHP not very easy for web page generation.

3. I bought PHP in a nutshell - A destop quick reference by Orielly -
this is
just another book that I got becuase I also have Perl in a
nutshell.

One crazy question is PHP derived from Perl , like C++ is derived
from C?

4. I got another book PHP - to actually learn it... its called :
Beginning PHP5 published by Dave W. Mercer ( and five other people
listed ) published by Wrox in 2004 - this is the latest newest book
that I saw.
I know that PHP6 is about, but this is as close as I could get for
a book
on the matter

I hope I made good choices since I was completely lost by the number
of books
on PHP that I could buy so I went with my best thoughts as I reviewed
them and
thats what I choose.

I read one book on PHP book where the author in the introduction
mentions on
one line :

Did I mention that PHP is open source ?

... twice through the intro.

Well any thoughts?

Thanks again
Apr 3 '07 #12

P: n/a
On 2007-04-03 06-22-12, K.J.Williams wrote:
1. [...] I have tried CSS on myspace.com and their server was terrible
when I was trying to customize my page layout. I have no idea what their
using but its terrible. The font colors wouldnt not work right.
If it can serve files, it's sufficient for CSS. Did you consider your HTML
or CSS might simply be wrong?

2. [...] There is one problem with Javascripting ( and HTML ) the
features of of the langauge is not totally universal with IE or
Mozilla/Firefox/ Netscape so in every Java Script, there has to be a
conditional statement which catches the web browsers type and use the
best most procedures - this might make my work with PHP not very easy
for web page generation.
Nope. JavaScript is what Netscape does. MSIE does not implement the whole
bunch of JavaScript functionality, but adds its own features. The result is
called JScript.

3. [...] One crazy question is PHP derived from Perl , like C++ is derived
from C?
In it's early days, PHP was just a bunch of Perl scripts. But that's
ancient PHP history.
Similarly, C++ isn't really a derive of C, even if it was years ago.
Nowadays, C++ bases on C features as well as C bases on C++ features.
Feature distribution works in both ways here.

4. I got another book PHP ...
If you want book, I can suggest the novels of Douglas Preston & Lincold
Child, Sidney Sheldon, Wolfgang Hohlbein (don't know the English
translations of him, though) and others.
If you want to learn PHP, however, your #1 resource is <http://php.netand
it's awesome manual.
Apr 3 '07 #13

P: n/a
On Apr 2, 11:27 pm, Simon Stienen <n...@news.slashlife.orgwrote:
On 2007-04-03 06-22-12, K.J.Williams wrote:
1. [...] I have tried CSS on myspace.com and their server was terrible
when I was trying to customize my page layout. I have no idea what their
using but its terrible. The font colors wouldnt not work right.

If it can serve files, it's sufficient for CSS. Did you consider your HTML
or CSS might simply be wrong?
I was using the syntax reciepe given by the people who have doctored
their myspace page
using CSS. I very well versed in HTML, but practice of CSS is new to
me.
>
2. [...] There is one problem with Javascripting ( and HTML ) the
features of of the langauge is not totally universal with IE or
Mozilla/Firefox/ Netscape so in every Java Script, there has to be a
conditional statement which catches the web browsers type and use the
best most procedures - this might make my work with PHP not very easy
for web page generation.

Nope. JavaScript is what Netscape does. MSIE does not implement the whole
bunch of JavaScript functionality, but adds its own features. The result is
called JScript.
So I would have to learn JScript and Javascript to do the equivalent
in my web pages?
for either MSIE or the Netscape variants?
>
3. [...] One crazy question is PHP derived from Perl , like C++ is derived
from C?

In it's early days, PHP was just a bunch of Perl scripts. But that's
ancient PHP history.
Similarly, C++ isn't really a derive of C, even if it was years ago.
Nowadays, C++ bases on C features as well as C bases on C++ features.
Feature distribution works in both ways here.
Well my understanding is that C++ is a addon to C, which adds OO
features, direct stream access,
a beter way of declaring and freeing memory (not that I dont mind
malloc() and free()),
you have a modified version of a struct that now allows its own
functions called class,
and then you have other little special operators such as scope
resolution to deal with that.
If you were to do only procedural work in C++ you do the same work in
C, just change your
classes to structs and strip out your class functions and make them as
stand alone
functions in the script. The only advantage I see in C++ is when I got
into dynamically
allocating memory in the form of a linear linked lists use nodes - it
can be done in C ,
but its alot harder with the syntax involved.

As hearsay, I have heard arguments about PHP is great for procedural
programming , terrible for
OO programming from Perl programmers. So the argument that they make,
in case, to me
at my college, 1. Perl a better shell script/cgi langauge than PHP in
Linux (all
Unix flavors) for that matter, 2. PHP is not designed for shell
scripting like Perl is.
PHP is strictly derived from PERL only for web-server - MySQL database
uses.

One question to ask ...

What do you think of PHP+GTK2 ?



Apr 3 '07 #14

P: n/a
On Apr 2, 8:22 pm, "K.J.Williams" <lordw...@quik.comwrote:
So today I went to my bookstore to pick up some stuff on
improving my programming skills for PHP.

1. I know HTML but I dont practice CSS in my own code
so I bought Cascading Style Sheets - The Definitive Guide
2nd Ed by Eric A. Meyer, published by O'reilly, to refresh my
memory on this (this book covers CSS2 & CSS2.1). I have tried CSS
on myspace.com and their server was terrible when I was trying
to customize my page layout. I have no idea what their using
but its terrible. The font colors wouldnt not work right.

Aside from that I think CSS is great but I need to practice it
more
so that it is useful with PHP web page generation.

2. I have JavaScript - The Definitive Guide 3rd Ed. by David Flanagan
published by O'reilly. I have had this book for a while so I am
taking the advice of learning to use HTML wtih Javascripting.
There is one problem with Javascripting ( and HTML ) the features
of
of the langauge is not totally universal with IE or Mozilla/Firefox/
Netscape
so in every Java Script, there has to be a conditional statement
which
catches the web browsers type and use the best most procedures -
this might
make my work with PHP not very easy for web page generation.

3. I bought PHP in a nutshell - A destop quick reference by Orielly -
this is
just another book that I got becuase I also have Perl in a
nutshell.

One crazy question is PHP derived from Perl , like C++ is derived
from C?

4. I got another book PHP - to actually learn it... its called :
Beginning PHP5 published by Dave W. Mercer ( and five other people
listed ) published by Wrox in 2004 - this is the latest newest book
that I saw.
I know that PHP6 is about, but this is as close as I could get for
a book
on the matter

I hope I made good choices since I was completely lost by the number
of books
on PHP that I could buy so I went with my best thoughts as I reviewed
them and
thats what I choose.

I read one book on PHP book where the author in the introduction
mentions on
one line :

Did I mention that PHP is open source ?

.. twice through the intro.

Well any thoughts?

Thanks again
Oreilly's books on PHP are good, also too is Sitepoint's Kevin Yank
PHP and Mysql

Apr 3 '07 #15

P: n/a
In article <11**********************@q75g2000hsh.googlegroups .com>,
K.J.Williams <lo******@quik.comwrote:
so in every Java Script, there has to be a conditional statement
which catches the web browsers type and use the best most
procedures - this might make my work with PHP not very easy for
web page generation.
Why not? PHP has an environment variable to tell you the client's user
agent string. You can then output whatever you want based on that.
One crazy question is PHP derived from Perl , like C++ is derived
from C?
PHP uses C++ syntax, but also makes use of some perl features such
as regular expression matching -- if you want them. To me, PHP
feels more like C++ without the strong variable typing constraints.
>I hope I made good choices since I was completely lost by the
number of books on PHP that I could buy so I went with my best
thoughts as I reviewed them and thats what I choose.
Personally I think you're buying too many books. The only thing I
ever needed for PHP was the online documentation at www.php.net.
The books are available for others to make money from you. Nothing
wrong with that, but if you already have a few programming languages
under your belt, you don't need yet another book for PHP, in my
opinion.

-A
Apr 3 '07 #16

P: n/a
2. I have JavaScript - The Definitive Guide 3rd Ed. by David Flanagan
published by O'reilly. I have had this book for a while so I am
taking the advice of learning to use HTML wtih Javascripting.
Here's something else to keep in mind...

Javascript and PHP have *very* similar syntax. Close enough to drive
you crazy when you find the differences.

To help my head, I code my JS like I code my PHP.

Yep! $ signs for all vars and the whole lot!

Yep! Makes the JS code look like PHP at first glance, but it also
helps my poor feeble brain when I read it.

But beware of the concantination symbol! PERIOD for PHP, PLUS for JS

OK, the array and classes are galaxies apart, but except that... (yes,
the list goes on) ;)

walter

Apr 4 '07 #17

P: n/a
I was going by the advice that I got on alt.comp.lang.learn.c-c++
group
that its best to have many reference books for knowing how to use a
langauge, I have at least 4 for books on C++ , 1 on C, 1 on C and C+
+...
and many of the authors hit and miss certain subjects.

I needed the CSS book becuase I dont know how to use CSS in HTML ,
I know HTML but not the integration CSS which is now a standard among
many businesses, along with that comes Javascripting - which I have
never
touched becuase of the frustration of non-standard HTML browsers such
as
MSIE, as for PHP , php in a nutshell was choosen as reference, and
the
other book published by wrox is to teach me.
And to go off on a tangent, as for a few programming langauges
I traded Commodore BASIC for C on my IBM - it took three years for me
to dewarp my mind from bad programming habits to develop good
programming habits
in C. HTML is a pseudo-programming langauge , ditto for Javascript.
The most
horrible langauges I have run into are COBOL, Pascal, Modula-2,
Fortran,
BASIC, and if not Visual BASIC in early versions. If and when Sunsoft
develops
a compiler that produce a independent machine code program from JAVA
code, I might
reconsider that langauge - that langauge is junk. Theres a whole
litany of religious
wars between JAVA and C++ programmers. But the most useful of all the
programming
langauges is assembly, the only langauge that has 3rd advantage over
all langauges.
Assembly langauge runs the fastest, has a 1 to 1 ratio of mnemonic to
machine code
translation ( yes that makes it a pain to program if you wanted to do
something big ),
but most of all you can revert any machine langauge back into assembly
langauge
and reverse engineer it to do something that it wasnt intended to do.
Now that means
you have to be a master of the machine your on. On newer machines that
have big
processors today, thats an undertaking task, but say long ago on a
Commodore 64 ,yes
it was - software piracy was rampant on that machine. And that
basically proves that
there can be no such thing as copyright protection scheme or anything
to prevent
software duplication. All software on CDs have to abide by a red book
standard?..
and that standard is available to anyone who builds hardware - or
software, or software
that copys that medium. And thats true for any standard among the
industry involved with
incoding of information mediums. The photocopier must have been the
biggest threat to
to the book industry, with the scanner following ( same technology ).

But to cut to the chase...

I want to use PHP to build a better nteractive web site with my web
clients.
Thats what I want

On Apr 3, 3:10 pm, a...@spamcop.net (axlq) wrote:
>
Personally I think you're buying too many books. The only thing I
ever needed for PHP was the online documentation atwww.php.net.
The books are available for others to make money from you. Nothing
wrong with that, but if you already have a few programming languages
under your belt, you don't need yet another book for PHP, in my
opinion.

-A

Apr 4 '07 #18

P: n/a
I think my friend is going to have more trouble with PHP than I am and
were
both going to have the same trouble of switching from the mentality of
developing
command line interface programs ( me for Linux ), and gui programs
( him for
windows ) to web based programs where there is no control over what
happens
on how it looks on the clients web browser. You just pray that it
looks
good. That will be a new concept, to learn.

On Apr 3, 10:18 pm, "otrWal...@gmail.com" <otrWal...@gmail.comwrote:
2. I have JavaScript - The Definitive Guide 3rd Ed. by David Flanagan
published by O'reilly. I have had this book for a while so I am
taking the advice of learning to use HTML wtih Javascripting.

Here's something else to keep in mind...

Javascript and PHP have *very* similar syntax. Close enough to drive
you crazy when you find the differences.

To help my head, I code my JS like I code my PHP.

Yep! $ signs for all vars and the whole lot!

Yep! Makes the JS code look like PHP at first glance, but it also
helps my poor feeble brain when I read it.

But beware of the concantination symbol! PERIOD for PHP, PLUS for JS

OK, the array and classes are galaxies apart, but except that... (yes,
the list goes on) ;)

walter

Apr 4 '07 #19

P: n/a
K.J.Williams wrote:
I needed the CSS book becuase I dont know how to use CSS in HTML ,
I know HTML but not the integration CSS which is now a standard among
many businesses
If you've not been using CSS, then the chances are, you've not been using
HTML properly either.
as for PHP , php in a nutshell was choosen as reference, and the
other book published by wrox is to teach me.
I agree that it's usually a good idea to have several books on a
programming language to be able to learn it. PHP is the exception though.

Firstly, PHP changes so often -- normally in backwards compatible ways,
true, but I don't think I've ever used a language where new features and
new functions are being added on such a frequent basis. Books become
obsolete very quickly. If you take a look at these two books you've got,
I'd bet that at least one of them teaches you the old PHP4 method for
object-oriented programming. Although that still works, PHP5 objects are
vastly more powerful.
HTML is a pseudo-programming langauge
HTML is not a programming language at all -- it's a data format, much like
JPEG or MP3 is.
ditto for Javascript.
Javascript is a fully featured programming object-oriented language. And
(browser compatibility problems aside) is actually rather pleasant to work
with. It's a bit like C or C++ in syntax, but without the need to worry
about pointers and memory locations; it has a good object orientation
model, but isn't militant about making you use it like Java is.
If and when Sunsoft develops a compiler that produce a independent
machine code program from JAVA code, I might reconsider that langauge -
that langauge is junk.
Consider it this way: a compiled C program will only run on the platform
it was compiled for. Say, for example, that you have a C program compiled
for Linux on the DEC Alpha processor. If you want to run it, you need to
buy a DEC Alpha processor -- they don't come cheap.

A compiled Java program will also only run on the platform that it was
compiled for. That platform is normally the Java virtual machine. So if
you want to run the program, then you need to buy a Java virtual machine.
Fortunately, they're free!

Whatsmore, there *is* a true compiler for Java -- it's part of the GCC
suite. See http://gcc.gnu.org/java/.

Java has many drawbacks, but device-independence is normally quoted as one
of its best features!
But the most useful of all the programming langauges is assembly
Nonsense. A programming language is only as useful as what people can do
with it. Given a week, and experienced, say, C programmer can do a lot
more in C than an experienced assembly programmer can do in assembly.

Sure, it's fast, and at certain times it's worth the programmer time to
drop down into assembly and eek a bit of extra speed out of the program.
But those situations are very rare; unless you're working on compression,
encryption, high-end 3D graphics or kernel development, you're unlikely to
encounter such a situation.
And that basically proves that there can be no such thing as copyright
protection scheme or anything to prevent software duplication.
http://en.wikipedia.org/wiki/Trusted_Computing

Summary: TC processors can be designed so that they refuse to run an
operating system unless it has been digitally signed. If you modify your
operating system, the signature will break, and you'll be unable to run
it; so for all intents and purposes, the OS cannot be modified. The TC
operating system similarly refuses to run a program unless it has been
signed; so for all intents and purposes, no programs can be modified.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 4 '07 #20

P: n/a
ot*******@gmail.com wrote:
To help my head, I code my JS like I code my PHP.
Yep! $ signs for all vars and the whole lot!
Does Javascript allow $ signs in variables? Hmmm... interesting.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 4 '07 #21

P: n/a
See my interjections to your comments below..

On Apr 4, 1:42 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
K.J.Williams wrote:
I needed the CSS book becuase I dont know how to use CSS in HTML ,
I know HTML but not the integration CSS which is now a standard among
many businesses

If you've not been using CSS, then the chances are, you've not been using
HTML properly either.
Thats true - I have learned to use HTML on my own and the limited book
choices that I was
given for learning HTML - I choose HTML for Dummies, and on line I
used some help from
several other sites on HTML. So I have used HTML effectively to my
uses but not to the
standard practice of using CSS. I have a program that I wrote in C
that automates the
script building of at least 314 html pages that I have that are in a
system I developed.
It works but I would like it to do *BETTER*. Theres always room for
doing better...in my book
(not the dummies book).
>
as for PHP , php in a nutshell was choosen as reference, and the
other book published by wrox is to teach me.

I agree that it's usually a good idea to have several books on a
programming language to be able to learn it. PHP is the exception though.

Firstly, PHP changes so often -- normally in backwards compatible ways,
true, but I don't think I've ever used a language where new features and
new functions are being added on such a frequent basis. Books become
obsolete very quickly. If you take a look at these two books you've got,
I'd bet that at least one of them teaches you the old PHP4 method for
object-oriented programming. Although that still works, PHP5 objects are
vastly more powerful.
HTML is a pseudo-programming langauge

HTML is not a programming language at all -- it's a data format, much like
JPEG or MP3 is.
I disagree.

HTML is an interpreted langauge that has a simple method of handling
wrong syntax, if the
web browser's interpreter parses a tag it doesnt recognize it ignores
it or if it does
recognize something that is like one of its tags but its incorrect
syntax it produces
undefined behavior. Otherwise, correct syntax will produce a result
from the interpreter.
>
ditto for Javascript.
My argument stands the same -- more or less for Javascript, its not
compiled therefore its
interpreted.

In my point of view - Javascript and HTML are programming langauges
from the stand point
they are interpreted - like Commodore's line numbered BASIC
>
Javascript is a fully featured programming object-oriented language. And
(browser compatibility problems aside) is actually rather pleasant to work
with. It's a bit like C or C++ in syntax, but without the need to worry
about pointers and memory locations; it has a good object orientation
model, but isn't militant about making you use it like Java is.
If and when Sunsoft develops a compiler that produce a independent
machine code program from JAVA code, I might reconsider that langauge -
that langauge is junk.

Consider it this way: a compiled C program will only run on the platform
it was compiled for. Say, for example, that you have a C program compiled
for Linux on the DEC Alpha processor. If you want to run it, you need to
buy a DEC Alpha processor -- they don't come cheap.

A compiled Java program will also only run on the platform that it was
compiled for. That platform is normally the Java virtual machine. So if
you want to run the program, then you need to buy a Java virtual machine.
Fortunately, they're free!
yeah but the designer of Java intended the langauge to be portable to
any machine that supports it and run it from a JVM, but its running
from a
second compiled form called byte code which depends on the JVM to run
it.
>
Whatsmore, there *is* a true compiler for Java -- it's part of the GCC
suite. Seehttp://gcc.gnu.org/java/.
Theres none for Windows XP, and secondly the compiler by gcc is has
bugs that
make certain features of Java not possible, some *.awt's are
icompatible
>
Java has many drawbacks, but device-independence is normally quoted as one
of its best features!
But the most useful of all the programming langauges is assembly

Nonsense. A programming language is only as useful as what people can do
with it. Given a week, and experienced, say, C programmer can do a lot
more in C than an experienced assembly programmer can do in assembly.

Sure, it's fast, and at certain times it's worth the programmer time to
drop down into assembly and eek a bit of extra speed out of the program.
But those situations are very rare; unless you're working on compression,
encryption, high-end 3D graphics or kernel development, you're unlikely to
encounter such a situation.
for todays applications - it assembly is good for optimization of
certain
parts of code or developing hardware drivers.
And that basically proves that there can be no such thing as copyright
protection scheme or anything to prevent software duplication.

http://en.wikipedia.org/wiki/Trusted_Computing

Summary: TC processors can be designed so that they refuse to run an
operating system unless it has been digitally signed. If you modify your
operating system, the signature will break, and you'll be unable to run
it; so for all intents and purposes, the OS cannot be modified. The TC
operating system similarly refuses to run a program unless it has been
signed; so for all intents and purposes, no programs can be modified.
No scheme is fool proof for any long term plan
>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Apr 4 '07 #22

P: n/a
Toby A Inkster wrote:
K.J.Williams wrote:

If you've not been using CSS, then the chances are, you've not been using
HTML properly either.
This comment doesn't really hold true, you can do good HTML without
knowing CSS. CSS didn't exist when HTML came out, but by the inference
in this comment it would mean hardly anyone every did any good HTML.

So it all depends on what version of HTML you're talking about, really
this would mean XHTML with CSS ?
Apr 4 '07 #23

P: n/a
K.J.Williams wrote:
See my interjections to your comments below..
Good, that's where we expect to find them.
HTML is a pseudo-programming langauge

HTML is not a programming language at all -- it's a data format, much
like JPEG or MP3 is.

I disagree.

HTML is an interpreted langauge that has a simple method of handling
Sheesh, I've been reading some weird stuff in this thread. HTML is not
a data format, it's not a programming language, it's a Markup Language.
Though if you've got to explain what that is to someone, calling it a
"data format" is probably a very good place to start.
yeah but the designer of Java intended the langauge to be portable to
any machine that supports it and run it from a JVM, but its running
from a second compiled form called byte code which depends on the JVM
to run it.
I was pretty sure that the original whitepaper [1] mentioned bytecode
and JVMs and yes, it does:
http://java.sun.com/docs/white/lange....doc1.html#402
Theres none for Windows XP, and secondly the compiler by gcc is has
Cygwin?
>http://en.wikipedia.org/wiki/Trusted_Computing

No scheme is fool proof for any long term plan
Something I can agree with you about.
>--
Shpxvat Google Groups. Toby's got a perfickly good sig-sep, but Google
ignores it. Google's "do no evil" mantra is starting to lose out to
a Microsoft-style "WE make the standards, you peasant" attitude.

[1] Can I just say that I read it when it came out? Can I?

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
Apr 4 '07 #24

P: n/a
On Mar 30, 2:31 am, "K.J.Williams" <lordw...@quik.comwrote:
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?

Thanks
KJW
Hello Friend
I also has exp in VB when I started PHP.
As said in one comment, It will be good to learn basic HTML first.
Then you can easily start with PHP and mysql.
You already know all the basic from another language so learning PHP
would be easy for you.

In PHP things will not so organised as VB. In PHP you can get
seperation of code through different
php page which can be included in any php pages like do from library.

Use this link:
http://satya61229.blogspot.com/2007/.../> simple.html

Apr 5 '07 #25

P: n/a
On Apr 4, 6:22 pm, Mary Pegg <inva...@invalid.comwrote:
K.J.Williams wrote:
See my interjections to your comments below..

Good, that's where we expect to find them.
HTML is a pseudo-programming langauge
HTML is not a programming language at all -- it's a data format, much
like JPEG or MP3 is.
I disagree.
HTML is an interpreted langauge that has a simple method of handling

Sheesh, I've been reading some weird stuff in this thread. HTML is not
a data format, it's not a programming language, it's a Markup Language.
Though if you've got to explain what that is to someone, calling it a
"data format" is probably a very good place to start.
yeah but the designer of Java intended the langauge to be portable to
any machine that supports it and run it from a JVM, but its running
from a second compiled form called byte code which depends on the JVM
to run it.

I was pretty sure that the original whitepaper [1] mentioned bytecode
and JVMs and yes, it does:http://java.sun.com/docs/white/lange....doc1.html#402
Theres none for Windows XP, and secondly the compiler by gcc is has

Cygwin?
>http://en.wikipedia.org/wiki/Trusted_Computing
No scheme is fool proof for any long term plan

Something I can agree with you about.
--

Shpxvat Google Groups. Toby's got a perfickly good sig-sep, but Google
ignores it. Google's "do no evil" mantra is starting to lose out to
a Microsoft-style "WE make the standards, you peasant" attitude.

[1] Can I just say that I read it when it came out? Can I?

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".

Apr 5 '07 #26

P: n/a
Tyno Gendo wrote:
Toby A Inkster wrote:
>If you've not been using CSS, then the chances are, you've not been using
HTML properly either.

This comment doesn't really hold true, you can do good HTML without
knowing CSS.
*Can* do good HTML without knowing CSS, yes. I said, "chances are".

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 5 '07 #27

This discussion thread is closed

Replies have been disabled for this discussion.