Beginner PHP Question - Access Data from Function
<p>I have this function:</p>

<pre><code>function selectValue($test) {
    $connection = dbConnect(HOST, USERNAME, PASSWORD, DATABASE);
    $query = "SELECT * FROM table where value = '$test'";
    $results = @mysql_query($query, $connection);   
    $value = mysql_fetch_assoc($results);
}

selectValue('abcde');

echo $value['something'];
</code></pre>

<p>This results in $value becoming an array. I would like to access this array from outside of the function.  I tried to do this using the last line of code above (ie. echo...) but this doesn't work.  How should I do this?</p>
