Do you still think that after trying it?
If not, let's read the doc again
PHP doc entry for foreach wrote:
foreach (array_expression as $value)
While you have have (well, probably have since you havn't showed what the code looks like after you fixed the missing parenthesis problem)
foreach (result $row)
And let's compare their parts
foreach
foreach
Identical!
(
(
Identical
array_expression
result
Identical!
... assuming (for now) result is an array expression (this is most likely the next error you will get)
Next up is
as
$row)
Not identical
At this point, your statement contains nothing else, while the php doc statement still contains $result).
However, since $row) and $result) seems to be so similar, perhaps you should instead compare those two, leaving nothing in your code to be compared with "as".
as
[missing!]
and finally
$result)
$row)
They use different variable names, but can for all other intents be considered identical.