Help with If-ElseIf Statement

Hi Everyone, I’m having issues with an IF - ELSE IF statement executing in PHP 4.0.

I’m passing 5 variables from a form page into an execution page. Only 1 of the 5 variables with contain a value which will be an INT value. I need an IF-ELSEIF statement to be able to parse through the 5 variables to grab the 1 that has a value. That value I was going to set to a different variable so i could use that throughout the execution page.

Here is what I have… the 5 variables are $var1-$var5 and I was trying to set the $var variable to the $var1-5 which contained a value. Currently the code is failing on 4th line ‘} elseif…’

<?
if ($var1 > 0) {
$var = $var1
} elseif ($var2 > 0) {
$var = $var2
} elseif ($var3 > 0) {
$var = $var3
} elseif ($var4 > 0) {
$var = $var4
} elseif ($var5 > 0) {
$var = $var5
} else {
echo “NO variables were selected!”;
}
?>

Thanks for the assistance in advance!