form_clean_id($id = NULL)
drupal-5/includes/form.inc, line 1599
Remove invalid characters from an HTML ID attribute string.
$id The ID to clean.
The cleaned ID.
| Name | Description |
|---|---|
| Form generation | Functions to enable the processing and display of HTML forms. |
<?php
function form_clean_id($id = NULL) {
$id = str_replace(array('][', '_', ' '), '-', $id);
return $id;
}
?>