Definition

module_exists($module)
drupal-5/includes/module.inc, line 214

Description

Determine whether a given module exists.

Parameters

$module The name of the module (without the .module extension).

Return value

TRUE if the module is both installed and enabled.

Code

<?php
function module_exists($module) {
  $list = module_list();
  return array_key_exists($module, $list);
}
?>