In our last episode,
<9a**********************************@w34g2000prm. googlegroups.com>, the
lovely and talented Phper broadcast on comp.lang.php:
Can anyone give me advice on how to learn PHP?
I don't know if this is really about learning PHP, but ...
You will see many questions here like "How do I <do something with a web
pagein PHP"? About 90% of the time, if you cannot do something without
PHP, you cannot do it with PHP.
If you cannot make a mock-up of your page in (valid) HTML, you cannot make
the page with PHP. If you cannot give the page the appearance you want in
CSS, you cannot use PHP to do it. If you cannot write a query in your
database client that works, you cannot write a query in PHP that works. If
some client-side script you want doesn't work when you use an editor to
enter it in an HTML document, it won't work if you use PHP to write it. In
other words, PHP can make what you are doing easy, if you know what you
doing. If you cannot write a valid HTML document without PHP, PHP cannot
write a valid document for you, and it cannot write magic HTML that does
things that are basically impossible in HTML (such as, from a recent
question, embed a font in HTML). If you are not too clear on the pros and
cons of (attempted) browser sniffing, PHP won't make that any clearer.
You'll make it much easier on yourself if you write a mock-up document with
dummy values first, and pass that through a validator before you use PHP to
write real values from your database in your document. Writing queries in
PHP will be a breeze if you first test queries in your database client.
Many, many people who have never written a web page, never styled an HTML
document, never used their database client, seem to think there is something
in "learning PHP" that will enable them to do those things.
--
Lars Eighner <http://larseighner.com/
us****@larseighner.com
Countdown: 250 days to go.