Sending Variable from one function to another php function
<p>I am trying to send a variable from a public function to a private static function as follows:</p>

<pre><code>public function getAirportFare($fare) {

    $fare2 = 1000;

    return self::getFinalFare($fare, $fare2);

}
</code></pre>

<p>TO:</p>

<pre><code>private static function getFinalFare($fare, $fare2) {

    $fare = $fare + $fare2;

    $final_fare = ($fare * self::$fare_factor);

    if (self::$str_wait_return == "true") {
        $final_fare = $final_fare * 2;
    }

    if (self::$str_return == "true" &amp;&amp; self::$return_date != "false" &amp;&amp; self::$return_time != "false") {

        // We need to calc to fare based on the return date and time
        $return_fare = self::getFare(1);

        // Append to final fare
        $final_fare = $final_fare + $return_fare;

    }

    return number_format($final_fare,2);

}
</code></pre>

<p>but $fare2 in the getFinalFare function is undefined? I was just wondering how I can pass this value?</p>
