Help with 'if' statement

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
codewriter
Forum Newbie
Posts: 6
Joined: Fri Jan 23, 2009 9:41 pm

Help with 'if' statement

Post 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.
wpsd2006
Forum Commoner
Posts: 66
Joined: Wed Jan 07, 2009 12:43 am

Re: Help with 'if' statement

Post 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
codewriter
Forum Newbie
Posts: 6
Joined: Fri Jan 23, 2009 9:41 pm

Re: Help with 'if' statement

Post 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.
Post Reply