[eluser]Unknown[/eluser]
Hi!
I was just wondering how to get around the problem of blank or null values. Say I have a function that looks like this:
Code:
function func($var1=1, $var2=2, $var3=3) {
//some stuff
}
Which I can access at a certain url:
Code:
http://site.com/index.php/[b]controller1/func/value1/value2/value3[/b]
However, when var1 or var 2 is missing,
Code:
http://site.com/index.php/[b]controller1/func//value2/value3[/b]
The function sets $var1 = value2,
instead of setting $var1 = 1 as I have specified in the func(tion).
Is there a way around this?