hi.. i was wondering how to make optional arguments in functions..
i have a function that needs 3 arguments, say page, pagelimit, table.. but then in some cases i need it to take 2 more: wherecol, whereval..
call and function:
PHP Code:
#call nr.1
echo pagelinks($page, $pagelimit["$subject"], $subject);
# results in warning: arg 4 and 5 missing
#call nr.2
echo pagelinks($page, $pagelimit["$subject"], $subject, "fid", $_GET['fid']);
# works fine
function pagelinks($page, $pagelimit, $table, $wcol, $wval)