26394Introduction to PEAR by Timothy Boronczykhttp://codewalkers.com/tutorials/49/1.htmlIn Picking Up Perl, Bradley Kuhn cites a saying from the Perl community which says, "Perl promotes laziness, impatience and hubris." He explains how lazy programmers don't want to write the same routines repeatedly so they design their code to be reusable as much as possible. Impatient programmers write efficient programs to do work for them and programmers with pride write clean, readable code and share it with others. The PHP Extension and Application Repository (PEAR) brings this philosophy to PHPPHP > Tips and Tutorials > Introduction to PHPOct 15, 2006
Strings are probably what you will use most in your PHP script. From concatenating, looking for patterns, trim, chop etc. So I guess it's a good idea to take a better look at this creature. We will also take a peek at some string functions that you might find useful for everyday coding.
If you are just starting to learn PHP you first need to find a free/cheap host (I personally prefer Fly2Blue as they are cheap, easy to use and offer great services and domain registration), you are then going to need to check that your host provides PHP of some kind (over all PHP tutorials, PHP5 is preferred). Or alternatively you can install your own server software and install your own version of PHP
Right, now we have a website developing environment, we need to learn to use this great language PHP. Like all great programming languages, we need to learn to print and the most common way of learning is to print "Hello, World!" and this tutorial is no exception
PHP is a server-side, cross-platform, HTML-embedded scripting language. Currently there are over half a million domains running PHP and it is freely available for download online from www.php.net. Much of PHP?s syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly. PHP eliminates the need for numerous small cgi programs by allowing you to place simple scripts directly in your HTML files. It also makes it easier to manage large web sites by placing all components of a web page in a single html file.
Let's get started. The first thing to do is connect to the database.The function to connect to MySQL is called mysql_connect. This function returns a resource which is a pointer to the database connection. It's also called a database handle, and we'll use it in later functions. Don't forget to replace your connection details.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.