function fckeditor_idsearch in FCKeditor - WYSIWYG HTML editor 6
Same name and namespace in other branches
- 5.2 fckeditor.module \fckeditor_idsearch()
- 5 fckeditor.module \fckeditor_idsearch()
Search the field id for matches in array of matches
@ param $array An $array with strings to match the $search parameter against
Parameters
$search: A string representing a form field id
Return value
TRUE on match, FALSE on no match
1 call to fckeditor_idsearch()
File
- ./
fckeditor.module, line 2224 - FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben
Code
function fckeditor_idsearch($search, $array) {
foreach ($array as $key => $value) {
if (!empty($value) && preg_match('/^' . str_replace('*', '.*', addslashes($value)) . '$/i', $search)) {
// on any first match we know we're done here so return positive
return TRUE;
}
}
return FALSE;
}