I am trying to access a database table field called "Category" from a database named 1.
The output of everything else works great, however, I am trying to get an if statement working on the data that is output.
Category has a numeric value of 1-3.
if ($row->Category == '1')
{
echo ("Products");
}
else if ($row->Catgeory == '2')
{
echo ("World");
}
else if ($row->Catgeory == '3')
{
echo ("lol");
}
Can someone tell me what I am doing wrong?
If Category field value = 1, then output Products, if the category field in the database has a value of 2, then output world, etc etc.