PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
// php 4
class foo {
function foo($arg1, $arg2, $arg3) {
// TODO add functionality
}
}
// php 5
class bar {
function __construct($arg1, $arg2, $arg3) {
// TODO add functionality
}
}
Yes, you can pass parameters as stated. They are passed to the constructor method of your class (which is run on instantiation of the class to an object). The constructor can do whatever it wants with them.