3

I used alot of if checks to convert category name to category ids for sql query. For eg.

/Index.php?cat=venue

And I handled it like

If($cat=='venue')
{
$cat =1;
}

And so on.

Comments
  • 0
    2c Comment.

    This kind of thing shorthand in php is usefull for.

    $cat = ( $cat=='venue' ? 1 : 0 );
Add Comment