How to pass a value from ScriptA to a class in ScriptB?
<p>How can I pass a value into my class via include class file and use it as a <code>$var</code> inside that class in PHP5?</p>

<p>Code so far:</p>

<pre><code>    // ScriptA

    $cacheF=test;

    include("ScriptB_MyClass.php");

    $one = new MyClass(array('$cacheF'));
    ------------

    // ScripB_MyClass.php

    class MyClass {

        var $cacheF;

        function __construct() {
           $this-&gt;cacheF = $cacheF;
           return $this-&gt;cacheF = $cacheF; 
        }

        $the_cache_path="/home/$cacheF/myfile.txt";

        // execute other functions

    }
</code></pre>
