Return value from PHP function
<p>what is wrong with the following code? Hope you understand what i´m trying to do. Im not very familiar with functions.</p>

<pre><code>funtion test ($variable) {
   $one = 3;
   if ($variable == 10) {
       $one = "2";
   }
   return $one;
}

foreach ($array as $arraypart) { 
   $part = explode(',',$arraypart);
   test($part[0]);
   echo $one;
}
</code></pre>
