I've been working on this bit of code
for about an hour and can't seem to figure out why it's not working. Does PHP allow
If/Else statements within While loops? I've tried adding different echos to both If/Else
statements and the latter (Else) will not show. Is this because I'm trying to use the
same variable names?
while($row =
mysql_fetch_array($result))
{
//assign
variables
$title = $row['title'];
$file_url =
$row['file_location'];
$category = $row['category'];
$layout =
$row['layout'];
If ($layout = "vertical")
{
//Page Layout
$BODYLAYOUT =
"vertical_body";
$GAMECONTAIN = "vertical_gameContain";
$GAMEWIDTH
= "vertical_game";
}
Else
{
// Page
Layout
$BODYLAYOUT = "horizontal_body";
$GAMECONTAIN =
"horizontal_gameContain";
$GAMEWIDTH =
"horizontal_game";
}
No comments:
Post a Comment