What is the simplest way to have one PHP script execute a different PHP script and assign the value it returns to a variable?
<p>I'm hitting a wall with this. It's difficult to find an answer because I'm not sure how to word the question, and I can't think of decent keywords either.</p>

<p>I'm writing a view object for use in an MVC framework I'm writing and it assembles pages by tying script outputs together. I'm stuck on the tie together part!</p>

<p>script1.php:</p>

<pre><code>&lt;?php

$variable = solution('/path/to/script2.php');
echo $variable;

?&gt;
</code></pre>

<p>script2.php:</p>

<pre><code>&lt;?php

// generates a random md5 hash just for example

mt_srand(microtime(true)*100000 + memory_get_usage(true));
$randommd5 = md5(uniqid(mt_rand(), true));
echo $randommd5;

?&gt;
</code></pre>

<p>How do I make both of these scripts return the same value every time I run script1.php?</p>

<p>Is there a PHP function for this purpose? If not, is there a simple and stable way of accomplishing this?</p>
