what is wrong with the following code? Hope you understand what I'm trying to do. I'm not very familiar with functions.
function test ($variable) {
$one = 3;
if ($variable == 10) {
$one = "2";
}
return $one;
}
foreach ($array as $arraypart) {
$part = explode(',',$arraypart);
test($part[0]);
echo $one;
}