-1

The following if statement does not seem to be working for me.

The two values in b1rafrica and b2rafrica are BIGINTs being pulled from a MySQL database (perhaps that might be something to do with it?).

When I run it with these values the site doesn't load:

b1rafrica = 200 b2rafrica = 150

If I remove the else then the site works...

I'm a total PHP noob so I apologise in advance if i'm doing something very stupid.

if ($b1rafrica >= $b2rafrica) {
    $africastyle ="africab1";
   }
  } else {
   $africastyle ="africab2";
  }

Cheers,

Will

willgreen
  • 5
  • 3
  • If you enable error reporting to the highest level and you enable display errors as well as logging errors to file, PHP will immediately tell you where an error occurred. – hakre Apr 03 '15 at 14:41

1 Answers1

0

Please provice more info, like what errors you're getting. But try this:

if ($b1rafrica >= $b2rafrica) {
    $africastyle ="africab1";
} else {
    $africastyle ="africab2";
}
Koeno
  • 1,493
  • 2
  • 16
  • 30