Loops and Branches 
Loop and branch commands (including foreach) should be followed by a space before the opening parenthesis.
for ($i = 0; $i < 10; $i++)
{
    // do something
}

while ($result = $db->fetch_array($results))
{
    // do something
}

if ($condition != 'something')
{
    // do something
}

foreach ($array AS $key => $val)
{
    // do something
}
'else if' should be used, rather than 'elseif'.
if ($condition)
{
    // do something
}
else if ($condition_two)
{
    // do something else
}
Copyright © 2024 MH Sub I, LLC dba vBulletin. All rights reserved. vBulletin® is a registered trademark of MH Sub I, LLC dba vBulletin.