| TOTAL: 5 Page: 1 of 1 |
|
Functions, Classes and Objects
Most people seem to think they first need to tell you why you should bother with all this before they tell you how to do it, but i'm not not going to do that. you certainly do not need to write and use classes in php, but if you are here then chances are you want to know some more about it. if you read this and decide that you have no reason to write your own classes, then you are probably right and i will not try to change your mind, but hopefully the reason will be something other than not kno

| Hits: | 250 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-10 |
Intro To Object Oriented Programming
One thing you dont see too much, is tutorials on object oriented php. Now some may be familiar with object from Java and C++, and then on the other hand, many of you may have no clue what object is. For this tutorial, you need to be pretty fluent in php. Object can be very complex and very confusing, so have a good understanding of php is a must. In object, you create classes, and within those classes functions. For instance I have a db class, which contains functions to do all my db work; ie

| Hits: | 100 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-10 |
Intro To Object Oriented: Creating Your First Class
You have havent done so yet, I strongly recommend you first read my Intro To Object before starting this tutorial. First thing we need to do is create two files. One that will contain our class, name this one func_math.php. The next file will be used to call the class and function, you can name this whatever you like.

| Hits: | 135 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-10 |
Classes and OOP in PHP
Object orientated programming (OOP) is a commonly used term when discussing modern programming techniques. One of the things that makes humans stand out is the ability to categorise - we put objects into categories of similar type of function. For example, we have the category vechicle. Within this category, you have the different types of vehicle - car, bug, train, van. In the same bag, a llama is a type of animal. This analogy applies to programming - we create functions to do specific tasks a

| Hits: | 154 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-10 |
Classes and objects in PHP
There are many ways to create programming code. One of the easiest but most powerful is to start using object oriented way to think and work. I will give you the basic how you create a class, and why. Have you written a lot of "db connect" in your projects? How many places do you have the username and password for your database? What happens when you want to change the password for you database? Or if you change host and has to change server name or database login? Sure this can be taken

| Hits: | 127 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-10 |