Hi.
I have a method that looks like this:
function x ($id) {
code..
}
Sometimes the function is being used without $id. This gives me an annoying error that function x is missing an argument. Is it possible to do something like this:
function x ($id or 1) {
code..
}
If $id isn’t present the method gets the value 1. I have been playing around with the syntax but can't figure it out.
Best regards.
Asbjørn Morell.