if ($type = "email") { ... } if ($type = "article") { ... }