Page 1 of 1

Help with 'if' statement

Posted: Fri Jan 23, 2009 9:43 pm
by codewriter
Im sorry if this is a bit of a vague question but does anyone have any idea why this statement does not work:

Code: Select all

 
if ($watchprod==$prods[$pr][0])
{
echo "content";
}
 
Thanks in advance.

Re: Help with 'if' statement

Posted: Fri Jan 23, 2009 9:57 pm
by wpsd2006
maybe putting more part of the code will make it easy for us to see
nothing wrong with your code

just check wheter this 3 got any value in it :
$watchprod
$prods
$pr

Re: Help with 'if' statement

Posted: Fri Jan 23, 2009 10:07 pm
by codewriter
Many thanks, have managed to get the code working now. Seems that the code wasnt interpreting the data from the flatfile database correctly.