php function arguments
I don't know how or where I got this idea in my head but for some reason I thought this was possible. Obviously after testing it doesn't work, but is there a way to make it work? I want to set $value2 without having to enter anything at all for $value1.

    function test($value1 = 1, $value2 = 2) {
        
    echo 'Value 1: '.$value1.'<br />';
    echo 'Value 2: '.$value2.'<br />';
    
    }
    
    test($value2 = 3);
    
    // output
    Value 1: 3
    Value 2: 2
php function arguments
===

I don't know how or where I got this idea in my head but for some reason I thought this was possible. Obviously after testing it doesn't work, but is there a way to make it work? I want to set $value2 without having to enter anything at all for $value1.

    function test($value1 = 1, $value2 = 2) {
        
    echo 'Value 1: '.$value1.'<br />';
    echo 'Value 2: '.$value2.'<br />';
    
    }
    
    test($value2 = 3);
    
    // output
    Value 1: 3
    Value 2: 2