The if syntax is as follows:
if (condition) statement;
Which means that you have the if keyword followed by the condition in parenthesis. If (and only if) the condition is
true will the following statement be executed. There is an extension to the if syntax being:
if (condition) statement1; else statement2;
Where statement1 will be performed if the condition is
true and statement2 will be performed if the condition is
false.
So the code that you want will be as follows:
PHP Code:
if ($this->getimagesizeinfo[2] == 1)
$GIFtemp = true;
else
$GIFtemp = false;
An alternative approach (and I suspect the one that you were trying to achieve) is as follows. Because the comparison $this->getimagesizeinfo[2] == 1 will return either
true or
false this can be assigned directly into the variable $GIFtemp, hence you will have:
PHP Code:
$GIFtemp = $this->getimagesizeinfo[2] == 1;
(notice in this case there is no need for the if keyword, it is a direct assignment)