Forum Moderators: coopster
The type of a variable is usually not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which that variable is used.
Also, you may want to refer to Type Juggling [us2.php.net].
Good luck!
Okay, what it does is links some code to a variable. Here's a pseudo-code example:
myType = new Type {
code...
}
myType var = "something";
..so, whenever myType is used, whatever data belonging to 'var' is passed to the subroutine belonging to 'myType'. The code can do something with that data, check it for validity, etc.
Anyway, you are looking for Classes [us2.php.net].
That tutorial on the basics should be sufficient for now :)
Best of luck!