Jump to content

[SOLVED] Simple IF's am I retarded?


jib

Recommended Posts

G'day

 

I am a bit confused, I was busy working on my site until I hit this wall. Basically the problem is this, there is an if statement with 3 possible outputs but it always just prints the first output. The code is like the following

 

if ($Category = $Cat1)

{

print stuff

}

elseif ($Category = $Cat2)

{

print other stuff

}

else

{

print more other stuff

}

 

now i put in commands to check that the category values are correct but it still always just spits out the result to the first IF even if the Category =  the second value (cat2)

 

What am I missing 0_o

Link to comment
https://forums.phpfreaks.com/topic/108325-solved-simple-ifs-am-i-retarded/
Share on other sites

You're not retarded. You're just tired from coding and needed a fresh pair of eyes to notice a small syntax error that you don't normally make.

 

Happens to everyone. No worries.

 

Nice use of "bloody". I'll be in Oxford in 3 weeks. I suppose I'll be hearing a lot of that soon.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.