Is it possible to pass a variable to function without passing the variables that come before it in the function definition?
For example, if my function looks like this:
function doThis( $v1, $v2, $v3 )
{
echo $v1.$v2.$v3;
}
Can I then call the function with only some of those variables, like doThis("v1",null,"v3") or some other way?
Yes, you can do
doThis("v1",null,"v3"), if you prepare your function to handle thatnullargument.For example your example will work just fine.
Or, if it makes sense you can change the order of the arguments so you can set defaults.