PHP array multiplication output error
===

I am trying to multiply two arrays together (price and user entered quantity.   

    if(isset($_POST['submit']))
    {
    	
    unset($_POST['submit']);
    $r=array();	
    $userqty=array();
    $userqty=$_POST;	
    
    	function array_multiply($userqty, $fullbox) {
    
        if (!is_array($userqty) || !is_array($fullbox)) {
            exit('Needs to be an array.');
        }
    
        $c1 = count($userqty);
        $c2 = count($fullbox);
    
        if ($c1 != $c2) {
            exit('$setOne and $setTwo must be the same length.');
        }
    
        for ($i = 0; $i < $c1; $i++) {
            $r[$i] = $userqty[$i] * $fullbox[$i];
        }
    
        return $r;
    
    }
    var_dump($fullbox);
    echo '<br>';
    echo '<br>';
    var_dump($userqty);
    echo '<br>';
    echo '<br>';
    var_dump($r);
    }


When I do the array dump at the end I see my values are correct in my array except the value of my resulting array is **array(0) { }**  When it should have the same number or entries as my original two.  Thanks in advance.