Problem with elseif statements

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 25, 2010   (RSS)

Re: [mel] Problem with elseif statements

By Dave - February 24, 2010

Hi Mel,

There's may be a number of issues to resolve, but start by adding an extra = like this:

<?php if ($biosRecord['region'] == 'north west'):?>
<?php if ($biosRecord['region'] == 'east midlands'):?>

= assigns a value, setting region to the text, where as == compares values, checking if they are equal.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Problem with elseif statements

By Mel - February 25, 2010

Hi Mel,

There's may be a number of issues to resolve, but start by adding an extra = like this:

<?php if ($biosRecord['region'] == 'north west'):?>
<?php if ($biosRecord['region'] == 'east midlands'):?>

= assigns a value, setting region to the text, where as == compares values, checking if they are equal.

Hope that helps!


Hi Dave thanks for the reply, this seems to have solved the problem

Thanks - Mel